X-iZhang commited on
Commit
adec6c3
·
verified ·
1 Parent(s): f00e4dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
  import sys
3
  import os
@@ -146,7 +157,7 @@ with gr.Blocks(title="RadEval: A framework for radiology text evaluation", theme
146
  gr.Markdown(
147
  """
148
  # 🩺 RadEval: A framework for radiology text evaluation
149
- [Github](https://pypi.org/project/RadEval/) | [PyPI]() | [Video](https://justin13601.github.io/files/radeval.mp4) |[arXiv]() | [RadEvalModernBERT Model](https://huggingface.co/IAMJB/RadEvalModernBERT) | [Expert Dataset]()
150
 
151
  **RadEval** is a lightweight, extensible framework for **evaluating radiology reports** using both standard NLP metrics (e.g. BLEU, ROUGE, BERTScore) and **radiology-specific measures** (e.g. RadGraph, CheXbert, GREEN). Whether you're benchmarking generation systems or validating clinical correctness, RadEval offers **comprehensive and interpretable** metrics out of the box.
152
 
 
1
+ def setup_cpu_environment():
2
+ os.environ['CUDA_VISIBLE_DEVICES'] = ''
3
+
4
+ torch.set_num_threads(4) # 根据你的 CPU 核心数调整
5
+
6
+ os.environ['TOKENIZERS_PARALLELISM'] = 'false'
7
+
8
+ os.environ['TRANSFORMERS_CACHE'] = './cache'
9
+
10
+ setup_cpu_environment()
11
+
12
  import gradio as gr
13
  import sys
14
  import os
 
157
  gr.Markdown(
158
  """
159
  # 🩺 RadEval: A framework for radiology text evaluation
160
+ [Github](https://github.com/jbdel/RadEval) | [PyPI](https://pypi.org/project/RadEval/) | [Video](https://justin13601.github.io/files/radeval.mp4) |[arXiv]() | [RadEvalModernBERT Model](https://huggingface.co/IAMJB/RadEvalModernBERT) | [Expert Dataset]()
161
 
162
  **RadEval** is a lightweight, extensible framework for **evaluating radiology reports** using both standard NLP metrics (e.g. BLEU, ROUGE, BERTScore) and **radiology-specific measures** (e.g. RadGraph, CheXbert, GREEN). Whether you're benchmarking generation systems or validating clinical correctness, RadEval offers **comprehensive and interpretable** metrics out of the box.
163