cd2412 commited on
Commit
a7b143d
·
verified ·
1 Parent(s): cb277bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,4 +1,4 @@
1
- # app.py (fixed)
2
  import os, sys, time, traceback, subprocess
3
  from typing import Tuple, Optional
4
  from PIL import Image
@@ -53,7 +53,7 @@ with gr.Blocks(title=TITLE, analytics_enabled=False) as demo:
53
  type="pil",
54
  label="Image",
55
  height=320,
56
- sources=["upload", "webcam", "clipboard"], # ✅ fixed
57
  )
58
  q_in = gr.Textbox(label="Question", placeholder="e.g., What colour is the bus?", lines=2, max_lines=4)
59
  source_in = gr.Radio(CONTROLLER_SOURCES, value="auto", label="Controller Source")
@@ -73,5 +73,5 @@ with gr.Blocks(title=TITLE, analytics_enabled=False) as demo:
73
 
74
  if __name__ == "__main__":
75
  port = int(os.getenv("PORT", "7860"))
76
- demo.queue(concurrency_count=2)
77
  demo.launch(server_name="0.0.0.0", server_port=port, share=False, show_error=True)
 
1
+ # app.py (fixed, no concurrency_count)
2
  import os, sys, time, traceback, subprocess
3
  from typing import Tuple, Optional
4
  from PIL import Image
 
53
  type="pil",
54
  label="Image",
55
  height=320,
56
+ sources=["upload", "webcam", "clipboard"], # valid
57
  )
58
  q_in = gr.Textbox(label="Question", placeholder="e.g., What colour is the bus?", lines=2, max_lines=4)
59
  source_in = gr.Radio(CONTROLLER_SOURCES, value="auto", label="Controller Source")
 
73
 
74
  if __name__ == "__main__":
75
  port = int(os.getenv("PORT", "7860"))
76
+ demo.queue() # no concurrency_count
77
  demo.launch(server_name="0.0.0.0", server_port=port, share=False, show_error=True)