volumetrader commited on
Commit
696aadf
·
verified ·
1 Parent(s): ef2e34d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -6
app.py CHANGED
@@ -113,9 +113,17 @@ def inference(image):
113
 
114
  return result
115
 
116
-
117
-
118
- demo = gr.Interface(fn=inference,
119
- inputs=gr.Image(label='Upload image'),
120
- outputs="text")
121
- demo.launch()
 
 
 
 
 
 
 
 
 
113
 
114
  return result
115
 
116
+ with gr.Blocks() as demo:
117
+ gr.Markdown(
118
+ """
119
+ # Hello World!
120
+ Start typing below to see the output.
121
+ """)
122
+ inp = gr.Image(label='Upload image')
123
+ out = gr.Markdown()
124
+ inp.change(inference, inp, out)
125
+ gr.HTML(f"<a href='https://www.google.com/'> Here's an example with Markdown component.</a>")
126
+ gr.Markdown(f"<a href='https://www.google.com/'> Example with HTML component!</a>")
127
+
128
+ if __name__ == "__main__":
129
+ demo.launch()