ysharma HF Staff commited on
Commit
53081f7
·
1 Parent(s): 105e0b1

added headings

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -54,8 +54,9 @@ def img2para(cnet_img2):
54
  demo = gr.Blocks()
55
 
56
  with demo:
 
57
  with gr.Row():
58
- audio_mic = gr.Audio(source="upload", type="filepath")
59
  with gr.Column():
60
  btn_whisper = gr.Button("Transcribe👇").style(full_width=True)
61
  prompt = gr.Textbox(label="prompt for SD image generation", interactive=False) #, value='a black swan')
@@ -83,8 +84,9 @@ with demo:
83
  demo_chain_events = gr.Blocks()
84
 
85
  with demo_chain_events:
 
86
  #with gr.Row():
87
- audio_mic = gr.Audio(source="upload", type="filepath")
88
  btn_whisper = gr.Button("Trigger the Chained Events🚀🚀").style(full_width=True)
89
  prompt = gr.Textbox(label="Getting the Prompt for Stable Diffusion using Whisper Gradio Client", interactive=False,) #value='a black swan'
90
 
@@ -105,12 +107,6 @@ with demo_chain_events:
105
  html_Img2para = gr.HTML("<h1><center>Image to Paragraph output👇</center></h1>") #.style(full_width=True)
106
  paragraph = gr.Textbox(label="Image to Paragraph generation")
107
 
108
- """
109
- btn_whisper.click(whisper_stt, audio_mic, prompt)
110
- btn_sd.click(ttimg, prompt, sd_img)
111
- btn_cnet.click(controlnet_img2img, [sd_img, cnet_prompt], [cnet_img1, cnet_img2])
112
- btn_Img2para.click(img2para, cnet_img1, paragraph)
113
- """
114
  btn_whisper.click(whisper_stt, audio_mic, prompt)\
115
  .success(ttimg, prompt, sd_img)\
116
  .success(controlnet_img2img, [sd_img, cnet_prompt], [cnet_img1, cnet_img2])\
@@ -121,6 +117,7 @@ with demo_chain_events:
121
 
122
  demo_joint = gr.Blocks()
123
  with demo_joint:
 
124
  with gr.Row():
125
  with gr.Box():
126
  demo.render()
 
54
  demo = gr.Blocks()
55
 
56
  with demo:
57
+ gr.HTML("<h3><center>Gradio Clients : Whisper Client -> Stable Diffusion Client -> ControlNet Client -> Image2Paragraph Client</center></h3>")
58
  with gr.Row():
59
+ audio_mic = gr.Audio(source="microphone") #, type="filepath")
60
  with gr.Column():
61
  btn_whisper = gr.Button("Transcribe👇").style(full_width=True)
62
  prompt = gr.Textbox(label="prompt for SD image generation", interactive=False) #, value='a black swan')
 
84
  demo_chain_events = gr.Blocks()
85
 
86
  with demo_chain_events:
87
+ gr.HTML("<h3><center>Chaining Gradio Clients using Events : Whisper Client -> Stable Diffusion Client -> ControlNet Client -> Image2Paragraph Client</center></h3>")
88
  #with gr.Row():
89
+ audio_mic = gr.Audio(source="microphone") #, type="filepath")
90
  btn_whisper = gr.Button("Trigger the Chained Events🚀🚀").style(full_width=True)
91
  prompt = gr.Textbox(label="Getting the Prompt for Stable Diffusion using Whisper Gradio Client", interactive=False,) #value='a black swan'
92
 
 
107
  html_Img2para = gr.HTML("<h1><center>Image to Paragraph output👇</center></h1>") #.style(full_width=True)
108
  paragraph = gr.Textbox(label="Image to Paragraph generation")
109
 
 
 
 
 
 
 
110
  btn_whisper.click(whisper_stt, audio_mic, prompt)\
111
  .success(ttimg, prompt, sd_img)\
112
  .success(controlnet_img2img, [sd_img, cnet_prompt], [cnet_img1, cnet_img2])\
 
117
 
118
  demo_joint = gr.Blocks()
119
  with demo_joint:
120
+ gr.HTML("<h1><center>🚀Revolutionize Your App Development with Gradio Client🏗️</center></h1>")
121
  with gr.Row():
122
  with gr.Box():
123
  demo.render()