aarsh28 commited on
Commit
172e7dc
·
verified ·
1 Parent(s): 4c3c06e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -11
app.py CHANGED
@@ -1,13 +1,17 @@
1
- # app.py -- minimal FastAPI app (HF-friendly)
2
- from fastapi import FastAPI
3
- from fastapi.responses import PlainTextResponse
4
 
5
- app = FastAPI()
 
 
 
 
 
 
 
 
 
6
 
7
- @app.get("/", response_class=PlainTextResponse)
8
- def root():
9
- return "Minimal FastAPI root OK"
10
-
11
- @app.get("/health")
12
- def health():
13
- return {"status": "ok"}
 
1
+ import gradio as gr
2
+ from pipeline.main_pipeline import create_story_video
 
3
 
4
+ demo = gr.Interface(
5
+ fn=create_story_video,
6
+ inputs=[
7
+ gr.Textbox(label="Prompt"),
8
+ gr.Dropdown(label="Language", choices=["English", "Hindi", "Marathi", "Kannada", "Punjabi"]),
9
+ gr.Dropdown(label="Tone", choices=["Default", "Bedtime", "Playtime", "Educational"])
10
+ ],
11
+ outputs=[gr.Video(), gr.Textbox()],
12
+ api_name="generate_story"
13
+ )
14
 
15
+ if __name__ == "__main__":
16
+ print("--- LAUNCHING ChitraKatha BACKEND SERVER ---")
17
+ demo.queue().launch(server_name="0.0.0.0")