malvika2003 commited on
Commit
8036442
·
verified ·
1 Parent(s): 9888b7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -1,5 +1,8 @@
 
1
  import gradio as gr
2
 
 
 
3
  examples = [
4
  "Give me a recipe for pizza with pineapple",
5
  "Write me a tweet about the new OpenVINO release",
@@ -90,6 +93,9 @@ with gr.Blocks() as demo:
90
  [user_text, model_output, performance],
91
  )
92
 
 
 
 
 
93
  if __name__ == "__main__":
94
- demo.queue()
95
- demo.launch(share=True)
 
1
+ from flask import Flask, render_template_string
2
  import gradio as gr
3
 
4
+ app = Flask(__name__)
5
+
6
  examples = [
7
  "Give me a recipe for pizza with pineapple",
8
  "Write me a tweet about the new OpenVINO release",
 
93
  [user_text, model_output, performance],
94
  )
95
 
96
+ @app.route('/')
97
+ def index():
98
+ return demo.launch(inline=True)
99
+
100
  if __name__ == "__main__":
101
+ app.run()