baixintech_zhangyiming_prod commited on
Commit
1c962af
·
1 Parent(s): 93f53d0

import components

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,4 +1,5 @@
1
- import gradio as gr
 
2
  from torchvision import transforms
3
  from transformers import ViTForImageClassification
4
 
@@ -21,5 +22,5 @@ def predict_view_angle(image):
21
  return predict_tags[indices[0]]
22
 
23
 
24
- app = gr.Interface(fn=predict_view_angle, inputs=gr.inputs.Image(type="pil"), outputs=gr.outputs.Textbox())
25
  app.launch()
 
1
+ import gradio as gr
2
+ import gradio.components as grc
3
  from torchvision import transforms
4
  from transformers import ViTForImageClassification
5
 
 
22
  return predict_tags[indices[0]]
23
 
24
 
25
+ app = gr.Interface(fn=predict_view_angle, inputs=grc.Image(type="pil"), outputs=grc.Textbox())
26
  app.launch()