emmjab commited on
Commit
c82d0ec
·
1 Parent(s): 27949a0

runtime failure -- claude told me the version of gradio updated the syntax for inputs and outputs

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -20,8 +20,12 @@ examples = ['lenticular.jpg', 'kelvin-helmholtz.jpg', 'mammatus.jpg']
20
  interpretation='default'
21
  enable_queue=True
22
 
 
 
 
 
23
  # i just separated this out into two lines the way the example has instead of the way the tutorial suggested
24
- cloud_inference_app = gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=3),title=title,description=description,article=article,examples=examples,interpretation=interpretation,enable_queue=enable_queue)
25
  cloud_inference_app.launch()
26
 
27
 
 
20
  interpretation='default'
21
  enable_queue=True
22
 
23
+ # this is apparently a fix for current gradio
24
+ inputs=gr.Image(type="pil")
25
+ outputs=gr.Label(num_top_classes=3)
26
+
27
  # i just separated this out into two lines the way the example has instead of the way the tutorial suggested
28
+ cloud_inference_app = gr.Interface(fn=predict,inputs=inputs,outputs=outputs,title=title,description=description,article=article,examples=examples,interpretation=interpretation,enable_queue=enable_queue)
29
  cloud_inference_app.launch()
30
 
31