Hugorowan commited on
Commit
eff5779
1 Parent(s): 1e3d6f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -11
app.py CHANGED
@@ -1,15 +1,13 @@
1
- from flask import Flask
2
 
3
- app = Flask(__name__)
 
4
 
5
- @app.route("/")
6
- def hello_world():
7
- return "Hello, World!"
8
 
9
- @app.route("/app")
10
- def call_app():
11
- import App
12
- return App.hello_world()
13
 
14
- if __name__ == "__main__":
15
- app.run(debug=True)
 
1
+ import gradio as gr
2
 
3
+ def greet(name):
4
+ return "Hello " + name + "!"
5
 
6
+ def add(a, b):
7
+ return a + b
 
8
 
9
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
10
+ demo.launch()
 
 
11
 
12
+ demo2 = gr.Interface(fn=add, inputs=["number", "number"], outputs="number")
13
+ demo2.launch()