Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,11 @@ import spaces
|
|
5 |
"""
|
6 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
7 |
"""
|
8 |
-
|
|
|
|
|
|
|
|
|
9 |
|
10 |
@spaces.GPU(duration=120)
|
11 |
def respond(
|
|
|
5 |
"""
|
6 |
For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
7 |
"""
|
8 |
+
try:
|
9 |
+
pipe = pipeline("text-generation", model="microsoft/Phi-3-mini-4k-instruct", framework="pt", trust_remote_code=True)
|
10 |
+
except Exception as e:
|
11 |
+
print(f"Error loading model: {e}")
|
12 |
+
pipe = None
|
13 |
|
14 |
@spaces.GPU(duration=120)
|
15 |
def respond(
|