singarajusaiteja's picture
update app.py
8a27e64 verified
raw
history blame
1.08 kB
import gradio as gr
import subprocess
import threading
import time
def launch_streamlit():
subprocess.Popen([
"streamlit", "run", "main.py", # โœ… Now at root level
"--server.port=7861",
"--server.address=0.0.0.0",
"--server.headless=true"
])
def create_interface():
threading.Thread(target=launch_streamlit, daemon=True).start()
time.sleep(8)
with gr.Blocks(title="๐Ÿ‡ฎ๐Ÿ‡ณ Corpus Collection Engine") as demo:
gr.HTML("""
<div style="text-align: center; padding: 20px; background: linear-gradient(135deg, #FF6B35, #F7931E); color: white; margin-bottom: 20px; border-radius: 10px;">
<h1>๐Ÿ‡ฎ๐Ÿ‡ณ Corpus Collection Engine</h1>
<p>AI-powered platform for preserving Indian cultural heritage</p>
</div>
""")
gr.HTML('<iframe src="http://localhost:7861" width="100%" height="800px" frameborder="0"></iframe>')
return demo
if __name__ == "__main__":
demo = create_interface()
demo.launch(server_port=7860, server_name="0.0.0.0")