goudas commited on
Commit
0d42efe
Β·
1 Parent(s): b9c3a3c

update gradio version to 4.45.0 and gradio_client to 1.4.0; add error handling for demo launch

Browse files
Files changed (2) hide show
  1. app.py +7 -2
  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.44.1")
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
- demo.queue().launch(share=True)
 
 
 
 
 
 
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.44.1
16
- gradio_client==1.3.0
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