Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,8 +36,8 @@ class SinaReasonMedicalChat:
|
|
| 36 |
# The PixtralProcessor requires an image argument, even if it's None.
|
| 37 |
# This is a mandatory part of the call signature.
|
| 38 |
self.dummy_image = None
|
| 39 |
-
self.load_model()
|
| 40 |
-
|
| 41 |
def load_model(self):
|
| 42 |
"""Load the SinaReason medical model and tokenizer using Unsloth"""
|
| 43 |
try:
|
|
@@ -76,7 +76,7 @@ class SinaReasonMedicalChat:
|
|
| 76 |
temperature: float = 0.7, top_p: float = 0.95) -> Tuple[str, List[List[str]]]:
|
| 77 |
"""Generate medical reasoning responses using the Unsloth model."""
|
| 78 |
# No need for model.to(DEVICE), Unsloth's device_map handles it.
|
| 79 |
-
|
| 80 |
self.model.eval()
|
| 81 |
if not message.strip():
|
| 82 |
return "", history
|
|
|
|
| 36 |
# The PixtralProcessor requires an image argument, even if it's None.
|
| 37 |
# This is a mandatory part of the call signature.
|
| 38 |
self.dummy_image = None
|
| 39 |
+
#self.load_model()
|
| 40 |
+
|
| 41 |
def load_model(self):
|
| 42 |
"""Load the SinaReason medical model and tokenizer using Unsloth"""
|
| 43 |
try:
|
|
|
|
| 76 |
temperature: float = 0.7, top_p: float = 0.95) -> Tuple[str, List[List[str]]]:
|
| 77 |
"""Generate medical reasoning responses using the Unsloth model."""
|
| 78 |
# No need for model.to(DEVICE), Unsloth's device_map handles it.
|
| 79 |
+
self.load_model()
|
| 80 |
self.model.eval()
|
| 81 |
if not message.strip():
|
| 82 |
return "", history
|