Abu1998 commited on
Commit
8bd7071
1 Parent(s): 9a19559

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +44 -9
app.py CHANGED
@@ -1,17 +1,49 @@
1
  import gradio as gr
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  demo = gr.Interface(
4
  [
5
  gr.Textbox(label="User Input", placeholder="Enter user input"),
6
  gr.Textbox(label="Script Text Output", placeholder="Script text output"),
7
- gr.Audio(label="Audio Output", type="filepath"),
8
- gr.Audio(label="Music Output", type="filepath"),
9
- gr.File(label="Audio Input", type="audio"),
10
- gr.File(label="CSV Input", type="file"),
11
- gr.File(label="Common CSV Output", type="file"),
12
- gr.File(label="GIF Input", type="image"),
13
- gr.File(label="Concatenate Cropped Output", type="video"),
14
- gr.File(label="Final Video Output", type="video"),
15
  ],
16
  [
17
  script_writing,
@@ -25,4 +57,7 @@ demo = gr.Interface(
25
  ],
26
  title="Dummy Hugging Face Gradio Space App",
27
  description="This is a dummy app with all the input and output boxes",
28
- )
 
 
 
 
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,
 
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()