Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,6 +13,7 @@ import spaces
|
|
| 13 |
|
| 14 |
# Model configuration
|
| 15 |
MODEL_NAME = "yasserrmd/SinaReason-Magistral-2509"
|
|
|
|
| 16 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
| 17 |
|
| 18 |
# Medical system prompt as recommended by the model card
|
|
@@ -142,6 +143,7 @@ class SinaReasonMedicalChat:
|
|
| 142 |
for new_token in streamer:
|
| 143 |
partial_response += new_token
|
| 144 |
|
|
|
|
| 145 |
# Extract thinking and response
|
| 146 |
thinking, response = self.extract_thinking_and_response(partial_response)
|
| 147 |
|
|
@@ -364,5 +366,6 @@ with gr.Blocks(css=css, title="SinaReason Medical Reasoning", theme=gr.themes.So
|
|
| 364 |
# Launch configuration for HF Spaces
|
| 365 |
if __name__ == "__main__":
|
| 366 |
demo.launch(
|
|
|
|
| 367 |
show_error=True
|
| 368 |
)
|
|
|
|
| 13 |
|
| 14 |
# Model configuration
|
| 15 |
MODEL_NAME = "yasserrmd/SinaReason-Magistral-2509"
|
| 16 |
+
MODEL_NAME = "yasserrmd/SinaReason-Magistral-2509-bnb-4bit"
|
| 17 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
| 18 |
|
| 19 |
# Medical system prompt as recommended by the model card
|
|
|
|
| 143 |
for new_token in streamer:
|
| 144 |
partial_response += new_token
|
| 145 |
|
| 146 |
+
prinr(partial_response)
|
| 147 |
# Extract thinking and response
|
| 148 |
thinking, response = self.extract_thinking_and_response(partial_response)
|
| 149 |
|
|
|
|
| 366 |
# Launch configuration for HF Spaces
|
| 367 |
if __name__ == "__main__":
|
| 368 |
demo.launch(
|
| 369 |
+
debug=True,
|
| 370 |
show_error=True
|
| 371 |
)
|