Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- hf_model.py +1 -2
hf_model.py
CHANGED
|
@@ -38,8 +38,7 @@ def generate_response(
|
|
| 38 |
)
|
| 39 |
return response.choices[0].message.content
|
| 40 |
except Exception as e:
|
| 41 |
-
return f"Error: {
|
| 42 |
-
|
| 43 |
|
| 44 |
def calculate_expression(expression: str) -> str:
|
| 45 |
"""Simple calculator for financial expressions."""
|
|
|
|
| 38 |
)
|
| 39 |
return response.choices[0].message.content
|
| 40 |
except Exception as e:
|
| 41 |
+
return f"Error: {repr(e)}\n\n{traceback.format_exc()}"
|
|
|
|
| 42 |
|
| 43 |
def calculate_expression(expression: str) -> str:
|
| 44 |
"""Simple calculator for financial expressions."""
|