AsyncCoder-10 commited on
Commit
60c1913
·
verified ·
1 Parent(s): 391c98c

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from fastapi import FastAPI
3
+ from app.main import app as fastapi_app # Import your existing FastAPI app
4
+
5
+ # Create a dummy Gradio interface (just a placeholder screen)
6
+ with gr.Blocks() as demo:
7
+ gr.Markdown("# Moderation API")
8
+ gr.Markdown("This is an API service. Please send POST requests to `/api/v1/moderate`.")
9
+
10
+ # Mount your FastAPI app onto the Gradio app
11
+ app = gr.mount_gradio_app(fastapi_app, demo, path="/")