miojizzy commited on
Commit
759f56a
·
1 Parent(s): 7bed224

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -35,20 +35,20 @@ def greet3(x, progress=gr.Progress()):
35
  return "hello"
36
 
37
 
38
- demo = gr.Interface(
39
- greet3,
40
- gr.Textbox(),
41
- gr.Textbox()
42
- )
 
 
 
 
 
 
 
 
 
43
 
44
- #demo = gr.Interface(
45
- # fn=greet3,
46
- # inputs=gr.Textbox(),
47
- # outputs=gr.Textbox(),
48
- # examples = "./example",
49
- # inputs=gr.Video(),
50
- # outputs="text",
51
- # examples = "./example",
52
- #)
53
  demo.queue().launch(debug=True)
54
 
 
35
  return "hello"
36
 
37
 
38
+ with gr.Blocks() as demo:
39
+ with gr.Row():
40
+ input = gr.Image()
41
+ output = gr.Textbox(value="", label="Output")
42
+ btn = gr.Button(value="Submit")
43
+ btn.click(greet3, inputs=input, outputs=output)
44
+
45
+ gr.Examples(
46
+ examples=[os.path.join(os.path.dirname(__file__), "example/test.mp4")],
47
+ inputs=input,
48
+ outputs=output,
49
+ fn=greet3,
50
+ cache_examples=True,
51
+ )
52
 
 
 
 
 
 
 
 
 
 
53
  demo.queue().launch(debug=True)
54