Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,17 @@
|
|
| 1 |
-
|
| 2 |
-
from
|
| 3 |
-
from fastapi.responses import PlainTextResponse
|
| 4 |
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 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")
|
|
|
|
|
|
|
|
|
|
|
|