focusit commited on
Commit
eba6fda
·
1 Parent(s): 359d3d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -9
app.py CHANGED
@@ -1,13 +1,16 @@
1
  # import gradio as gr
2
- from flask import Flask
3
 
4
  # gr.Interface.load("models/deepset/roberta-base-squad2").launch()
5
 
6
- app = Flask(__name__) #creating the Flask class object
7
-
8
- @app.route('/home') #decorator drfines the
9
- def home():
10
- return "hello, this is our first flask website";
11
-
12
- if __name__ =='__main__':
13
- app.run(debug = True)
 
 
 
 
1
  # import gradio as gr
2
+
3
 
4
  # gr.Interface.load("models/deepset/roberta-base-squad2").launch()
5
 
6
+ import gradio
7
+
8
+ def my_inference_function(name):
9
+ return "Hello " + name + "!"
10
+
11
+ gradio_interface = gradio.Interface(
12
+ fn = my_inference_function,
13
+ inputs = "text",
14
+ outputs = "text"
15
+ )
16
+ gradio_interface.launch()