Spaces:
Runtime error
Runtime error
Faisal
commited on
Commit
Β·
d0e8efe
1
Parent(s):
e241dc7
Restore GPU version - remove CPU optimizations and restore GPU-compatible dependencies
Browse files
app.py
CHANGED
|
@@ -129,9 +129,10 @@ Original Answer:
|
|
| 129 |
try:
|
| 130 |
detailed_answer = response.json()["choices"][0]["message"]["content"]
|
| 131 |
except Exception as e:
|
| 132 |
-
return f"Error from DeepSeek
|
|
|
|
|
|
|
| 133 |
|
| 134 |
-
return detailed_answer
|
| 135 |
|
| 136 |
# ----------------------------
|
| 137 |
# GRADIO UI
|
|
@@ -147,7 +148,7 @@ with gr.Blocks(title="Brain MRI QA") as demo:
|
|
| 147 |
# Right column
|
| 148 |
with gr.Column():
|
| 149 |
# llm_output = gr.Textbox(label="Detailed LLM Answer", interactive=False, lines=10)
|
| 150 |
-
llm_output = gr.
|
| 151 |
|
| 152 |
submit_btn.click(
|
| 153 |
fn=process_pipeline,
|
|
|
|
| 129 |
try:
|
| 130 |
detailed_answer = response.json()["choices"][0]["message"]["content"]
|
| 131 |
except Exception as e:
|
| 132 |
+
return f"**Error from DeepSeek:** {str(e)}\n\n```\n{response.text}\n```"
|
| 133 |
+
|
| 134 |
+
return f"{detailed_answer}"
|
| 135 |
|
|
|
|
| 136 |
|
| 137 |
# ----------------------------
|
| 138 |
# GRADIO UI
|
|
|
|
| 148 |
# Right column
|
| 149 |
with gr.Column():
|
| 150 |
# llm_output = gr.Textbox(label="Detailed LLM Answer", interactive=False, lines=10)
|
| 151 |
+
llm_output = gr.Markdown(label="Detailed LLM Answer")
|
| 152 |
|
| 153 |
submit_btn.click(
|
| 154 |
fn=process_pipeline,
|