Update app.py
Browse files
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") #
|
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=
|
|
|
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
|