pakdeveloper commited on
Commit
497d7a6
·
verified ·
1 Parent(s): 8eddb8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -6
app.py CHANGED
@@ -1,8 +1,14 @@
1
- import gradio as gr
2
 
3
- def load_html():
4
- with open("index.html", "r", encoding="utf-8") as file:
5
- return file.read()
6
 
7
- iface = gr.Interface(fn=load_html, inputs=[], outputs="html", live=True)
8
- iface.launch()
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask, send_from_directory
2
 
3
+ app = Flask(__name__, static_folder="static")
 
 
4
 
5
+ @app.route("/")
6
+ def serve_html():
7
+ return send_from_directory("static", "index.html")
8
+
9
+ @app.route("/vid.mp4")
10
+ def serve_video():
11
+ return send_from_directory("static", "vid.mp4")
12
+
13
+ if __name__ == "__main__":
14
+ app.run(host="0.0.0.0", port=7860)