Update src/gradio_server.py
Browse files- src/gradio_server.py +0 -15
src/gradio_server.py
CHANGED
@@ -118,18 +118,3 @@ iface2 = gr.Interface(
|
|
118 |
|
119 |
# Combine the interfaces in a Tabbed interface
|
120 |
iface_combined = gr.TabbedInterface([iface, iface2], ["Detect Radicalization", "Policy Enforcement"])
|
121 |
-
|
122 |
-
|
123 |
-
if __name__ == "__main__":
|
124 |
-
import uvicorn
|
125 |
-
from threading import Thread
|
126 |
-
|
127 |
-
# Run FastAPI server in a separate thread
|
128 |
-
def run_fastapi():
|
129 |
-
uvicorn.run(app, host="0.0.0.0", port=8000)
|
130 |
-
|
131 |
-
fastapi_thread = Thread(target=run_fastapi)
|
132 |
-
fastapi_thread.start()
|
133 |
-
|
134 |
-
# Launch Gradio Interface
|
135 |
-
iface_combined.launch()
|
|
|
118 |
|
119 |
# Combine the interfaces in a Tabbed interface
|
120 |
iface_combined = gr.TabbedInterface([iface, iface2], ["Detect Radicalization", "Policy Enforcement"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|