Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,7 @@ from pydantic import BaseModel
|
|
13 |
hf_login(token=os.getenv("HF_TOKEN"))
|
14 |
|
15 |
model_name = "meta-llama/Llama-3.2-1B-Instruct"
|
|
|
16 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
17 |
|
18 |
model = AutoModelForCausalLM.from_pretrained(
|
@@ -134,7 +135,6 @@ with gr.Blocks() as demo:
|
|
134 |
with gr.Row():
|
135 |
gr.CheckboxGroup(
|
136 |
label="General Information",
|
137 |
-
info="Which information do you want to include?",
|
138 |
choices=[
|
139 |
"Age",
|
140 |
"Gender",
|
@@ -142,21 +142,15 @@ with gr.Blocks() as demo:
|
|
142 |
"Social History",
|
143 |
]
|
144 |
)
|
145 |
-
|
146 |
-
with gr.Row():
|
147 |
gr.CheckboxGroup(
|
148 |
label="Medical History",
|
149 |
-
info="Which information do you want to include?",
|
150 |
choices=[
|
151 |
"Family History",
|
152 |
"Medical Surgical History",
|
153 |
]
|
154 |
)
|
155 |
-
|
156 |
-
with gr.Row():
|
157 |
gr.CheckboxGroup(
|
158 |
label="Signs and Symptoms",
|
159 |
-
info="Which information do you want to include?",
|
160 |
choices=[
|
161 |
"Signs and Symptoms",
|
162 |
"Comorbidities",
|
@@ -166,7 +160,6 @@ with gr.Blocks() as demo:
|
|
166 |
with gr.Row():
|
167 |
gr.CheckboxGroup(
|
168 |
label="Medical Assesments",
|
169 |
-
info="Which information do you want to include?",
|
170 |
choices=[
|
171 |
"Diagnostic Techniques and Procedures",
|
172 |
"Laboratory Values",
|
@@ -174,11 +167,8 @@ with gr.Blocks() as demo:
|
|
174 |
"Diagnosis",
|
175 |
]
|
176 |
)
|
177 |
-
|
178 |
-
with gr.Row():
|
179 |
gr.CheckboxGroup(
|
180 |
label="Therapy and Results",
|
181 |
-
info="Which information do you want to include?",
|
182 |
choices=[
|
183 |
"Pharmacological Therapy",
|
184 |
"Interventional Therapy",
|
|
|
13 |
hf_login(token=os.getenv("HF_TOKEN"))
|
14 |
|
15 |
model_name = "meta-llama/Llama-3.2-1B-Instruct"
|
16 |
+
model_name = "gregorlied/Llama-3.2-1B-Instruct-Medical-Report-Summarization"
|
17 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
18 |
|
19 |
model = AutoModelForCausalLM.from_pretrained(
|
|
|
135 |
with gr.Row():
|
136 |
gr.CheckboxGroup(
|
137 |
label="General Information",
|
|
|
138 |
choices=[
|
139 |
"Age",
|
140 |
"Gender",
|
|
|
142 |
"Social History",
|
143 |
]
|
144 |
)
|
|
|
|
|
145 |
gr.CheckboxGroup(
|
146 |
label="Medical History",
|
|
|
147 |
choices=[
|
148 |
"Family History",
|
149 |
"Medical Surgical History",
|
150 |
]
|
151 |
)
|
|
|
|
|
152 |
gr.CheckboxGroup(
|
153 |
label="Signs and Symptoms",
|
|
|
154 |
choices=[
|
155 |
"Signs and Symptoms",
|
156 |
"Comorbidities",
|
|
|
160 |
with gr.Row():
|
161 |
gr.CheckboxGroup(
|
162 |
label="Medical Assesments",
|
|
|
163 |
choices=[
|
164 |
"Diagnostic Techniques and Procedures",
|
165 |
"Laboratory Values",
|
|
|
167 |
"Diagnosis",
|
168 |
]
|
169 |
)
|
|
|
|
|
170 |
gr.CheckboxGroup(
|
171 |
label="Therapy and Results",
|
|
|
172 |
choices=[
|
173 |
"Pharmacological Therapy",
|
174 |
"Interventional Therapy",
|