Spaces:
Runtime error
Runtime error
update gradio version to 4.45.0 and gradio_client to 1.4.0; add error handling for demo launch
Browse files- app.py +7 -2
- requirements.txt +2 -2
app.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
import base64, os
|
3 |
# add a command for installing flash-attn
|
4 |
os.system('pip install flash-attn --no-build-isolation')
|
5 |
-
os.system("pip install gradio==4.
|
6 |
|
7 |
from typing import Optional
|
8 |
import spaces
|
@@ -283,4 +283,9 @@ with gr.Blocks() as demo:
|
|
283 |
|
284 |
# demo.launch(debug=False, show_error=True, share=True)
|
285 |
# demo.launch(share=True, server_port=7861, server_name='0.0.0.0')
|
286 |
-
|
|
|
|
|
|
|
|
|
|
|
|
2 |
import base64, os
|
3 |
# add a command for installing flash-attn
|
4 |
os.system('pip install flash-attn --no-build-isolation')
|
5 |
+
os.system("pip install gradio==4.45.0")
|
6 |
|
7 |
from typing import Optional
|
8 |
import spaces
|
|
|
283 |
|
284 |
# demo.launch(debug=False, show_error=True, share=True)
|
285 |
# demo.launch(share=True, server_port=7861, server_name='0.0.0.0')
|
286 |
+
try:
|
287 |
+
demo.queue().launch(share=True)
|
288 |
+
except Exception as e:
|
289 |
+
print(f"Error launching Gradio app: {e}")
|
290 |
+
# Fallback to basic launch without queue
|
291 |
+
demo.launch(share=True)
|
requirements.txt
CHANGED
@@ -12,8 +12,8 @@ pydantic>=2.0
|
|
12 |
markdown2[all]
|
13 |
numpy
|
14 |
scikit-learn==1.5.0
|
15 |
-
gradio==4.
|
16 |
-
gradio_client==1.
|
17 |
spaces
|
18 |
requests
|
19 |
httpx
|
|
|
12 |
markdown2[all]
|
13 |
numpy
|
14 |
scikit-learn==1.5.0
|
15 |
+
gradio==4.45.0
|
16 |
+
gradio_client==1.4.0
|
17 |
spaces
|
18 |
requests
|
19 |
httpx
|