ftx7go commited on
Commit
816bdf4
·
verified ·
1 Parent(s): 169eab7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -4,15 +4,15 @@ import threading
4
 
5
  app = Flask(__name__)
6
 
7
- # Route to serve HTML page
8
  @app.route("/")
9
  def home():
10
- return render_template("re.html") # Flask will load from templates folder
11
 
12
- # Function to run Gradio separately
13
  def run_gradio():
14
  gr.Interface(lambda: "Gradio App Running!", inputs=[], outputs="text").launch(share=True)
15
 
16
  if __name__ == "__main__":
17
  threading.Thread(target=run_gradio).start()
18
- app.run(host="0.0.0.0", port=5000, debug=True) # Change port if needed
 
4
 
5
  app = Flask(__name__)
6
 
7
+ # Route to serve the HTML page
8
  @app.route("/")
9
  def home():
10
+ return render_template("re.html") # Ensure file is in "templates" folder
11
 
12
+ # Function to run Gradio UI separately
13
  def run_gradio():
14
  gr.Interface(lambda: "Gradio App Running!", inputs=[], outputs="text").launch(share=True)
15
 
16
  if __name__ == "__main__":
17
  threading.Thread(target=run_gradio).start()
18
+ app.run(host="0.0.0.0", port=7860, debug=True) # Port should be 7860