Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,63 @@
|
|
1 |
-
|
2 |
-
from script_writing import generate_script
|
3 |
|
4 |
-
|
|
|
|
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
|
|
2 |
|
3 |
+
def script_writing(user_input):
|
4 |
+
# script writing logic here
|
5 |
+
return {"scripttxt_output": "Script generated"}
|
6 |
|
7 |
+
def audio_gen(scripttxt_input):
|
8 |
+
# audio generation logic here
|
9 |
+
return {"audio_output": "Audio generated"}
|
10 |
+
|
11 |
+
def music_gen(scripttxt_input):
|
12 |
+
# music generation logic here
|
13 |
+
return {"music_output": "Music generated"}
|
14 |
+
|
15 |
+
def time_stamp_code(audio_input):
|
16 |
+
# time stamp code logic here
|
17 |
+
return {"tscsv_output": "Time stamp code generated"}
|
18 |
+
|
19 |
+
def common_words_remover(csv_input):
|
20 |
+
# common words remover logic here
|
21 |
+
return {"commoncsv_output": "Common words removed"}
|
22 |
+
|
23 |
+
def giphy_download(commoncsv_input):
|
24 |
+
# giphy download logic here
|
25 |
+
return {"gif_output": "GIF downloaded"}
|
26 |
+
|
27 |
+
def crop_git(gif_input, commoncsv_input):
|
28 |
+
# crop git logic here
|
29 |
+
return {"concatenate_cropped_output": "Cropped GIF"}
|
30 |
+
|
31 |
+
def concate_audio_gif_music(concatenate_cropped_input, audio_input, tscsv_input, music_input):
|
32 |
+
# concatenate audio, gif, and music logic here
|
33 |
+
return {"final_video_output": "Final video generated"}
|
34 |
+
|
35 |
+
demo = gr.Interface(
|
36 |
+
[
|
37 |
+
gr.Textbox(label="User Input", placeholder="Enter user input"),
|
38 |
+
gr.Textbox(label="Script Text Output", placeholder="Script text output"),
|
39 |
+
gr.Audio(label="Audio Output", type="mp3"),
|
40 |
+
gr.Audio(label="Music Output", type="mp3"),
|
41 |
+
gr.File(label="Audio Input", type="mp3"),
|
42 |
+
gr.File(label="CSV Input", type="csv"),
|
43 |
+
gr.File(label="Common CSV Output", type="csv"),
|
44 |
+
gr.File(label="GIF Input", type="gif"),
|
45 |
+
gr.File(label="Concatenate Cropped Output", type="mp4"),
|
46 |
+
gr.File(label="Final Video Output", type="mp4"),
|
47 |
+
],
|
48 |
+
[
|
49 |
+
script_writing,
|
50 |
+
audio_gen,
|
51 |
+
music_gen,
|
52 |
+
time_stamp_code,
|
53 |
+
common_words_remover,
|
54 |
+
giphy_download,
|
55 |
+
crop_git,
|
56 |
+
concate_audio_gif_music,
|
57 |
+
],
|
58 |
+
title="Dummy Hugging Face Gradio Space App",
|
59 |
+
description="This is a dummy app with all the input and output boxes",
|
60 |
+
)
|
61 |
+
|
62 |
+
if __name__ == "__main__":
|
63 |
+
demo.launch()
|