File size: 536 Bytes
1338706 f494b68 1338706 f494b68 8d0869a f494b68 1338706 8d0869a 1338706 f494b68 1338706 8d0869a 48e0944 f494b68 1338706 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from flask import Flask, render_template
import gradio as gr
import threading
app = Flask(__name__)
# Route to serve HTML page
@app.route("/")
def home():
return render_template("re.html") # Flask will load from templates folder
# Function to run Gradio separately
def run_gradio():
gr.Interface(lambda: "Gradio App Running!", inputs=[], outputs="text").launch(share=True)
if __name__ == "__main__":
threading.Thread(target=run_gradio).start()
app.run(host="0.0.0.0", port=5000, debug=True) # Change port if needed |