Delete gradio_app.py
Browse files- gradio_app.py +0 -23
gradio_app.py
DELETED
|
@@ -1,23 +0,0 @@
|
|
| 1 |
-
# gradio_app.py
|
| 2 |
-
import gradio as gr
|
| 3 |
-
import subprocess
|
| 4 |
-
import threading
|
| 5 |
-
import os
|
| 6 |
-
|
| 7 |
-
def launch_streamlit():
|
| 8 |
-
# Run Streamlit on port 8501
|
| 9 |
-
cmd = ["streamlit", "run", "app.py", "--server.port", "8501", "--server.headless", "true"]
|
| 10 |
-
subprocess.Popen(cmd)
|
| 11 |
-
|
| 12 |
-
# Launch Streamlit in a background thread
|
| 13 |
-
threading.Thread(target=launch_streamlit, daemon=True).start()
|
| 14 |
-
|
| 15 |
-
# Create a Gradio interface with iframe
|
| 16 |
-
def streamlit_ui():
|
| 17 |
-
return '<iframe src="http://localhost:8501" width="100%" height="600"></iframe>'
|
| 18 |
-
|
| 19 |
-
with gr.Blocks() as demo:
|
| 20 |
-
gr.HTML(streamlit_ui)
|
| 21 |
-
|
| 22 |
-
if __name__ == "__main__":
|
| 23 |
-
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|