peb-peb commited on
Commit
ce8df04
1 Parent(s): 4e8414c

add UI interface

Browse files
Files changed (1) hide show
  1. app.py +31 -30
app.py CHANGED
@@ -108,37 +108,38 @@ def greet3(name):
108
  return "Hola " + name + "!"
109
 
110
  with gr.Blocks() as demo:
111
- with gr.Row():
112
- with gr.Column():
113
- audio_file = gr.File(label="Upload a Audio file (.wav)", file_count=1)
114
- # name = gr.Textbox(label="Name", placeholder="Name") # TODO: remove
115
- number_of_speakers = gr.Number(label="Number of Speakers", value=2)
116
- with gr.Row():
117
- btn_clear = gr.Button(value="Clear")
118
- btn_submit = gr.Button(value="Submit")
119
- with gr.Column():
120
- title = gr.Textbox(label="Title", placeholder="Title for Conversation")
121
- short_summary = gr.Textbox(label="Short Summary", placeholder="Short Summary for Conversation")
122
- sentiment_analysis = gr.Textbox(label="Sentiment Analysis", placeholder="Sentiment Analysis for Conversation")
123
- quality = gr.Textbox(label="Quality of Conversation", placeholder="Quality of Conversation")
124
- detailed_summary = gr.Textbox(label="Detailed Summary", placeholder="Detailed Summary for Conversation")
125
- gr.Markdown("## Examples")
126
- gr.Examples(
127
- examples=[
128
- [
129
- "Harsh",
130
- 2,
 
 
 
 
 
 
131
  ],
132
- [
133
- "Rahul",
134
- 2,
135
- ],
136
- ],
137
- inputs=[title],
138
- outputs=[short_summary],
139
- fn=greet1,
140
- cache_examples=True,
141
- )
142
  gr.Markdown(
143
  """
144
  See [github.com/facebookresearch/audiocraft](https://github.com/facebookresearch/audiocraft)
 
108
  return "Hola " + name + "!"
109
 
110
  with gr.Blocks() as demo:
111
+ with gr.Box():
112
+ with gr.Row():
113
+ with gr.Column():
114
+ audio_file = gr.File(label="Upload a Audio file (.wav)", file_count=1)
115
+ # name = gr.Textbox(label="Name", placeholder="Name") # TODO: remove
116
+ number_of_speakers = gr.Number(label="Number of Speakers", value=2)
117
+ with gr.Row():
118
+ btn_clear = gr.Button(value="Clear")
119
+ btn_submit = gr.Button(value="Submit")
120
+ with gr.Column():
121
+ title = gr.Textbox(label="Title", placeholder="Title for Conversation")
122
+ short_summary = gr.Textbox(label="Short Summary", placeholder="Short Summary for Conversation")
123
+ sentiment_analysis = gr.Textbox(label="Sentiment Analysis", placeholder="Sentiment Analysis for Conversation")
124
+ quality = gr.Textbox(label="Quality of Conversation", placeholder="Quality of Conversation")
125
+ detailed_summary = gr.Textbox(label="Detailed Summary", placeholder="Detailed Summary for Conversation")
126
+ gr.Markdown("## Examples")
127
+ gr.Examples(
128
+ examples=[
129
+ [
130
+ "Harsh",
131
+ 2,
132
+ ],
133
+ [
134
+ "Rahul",
135
+ 2,
136
+ ],
137
  ],
138
+ inputs=[title],
139
+ outputs=[short_summary],
140
+ fn=greet1,
141
+ cache_examples=True,
142
+ )
 
 
 
 
 
143
  gr.Markdown(
144
  """
145
  See [github.com/facebookresearch/audiocraft](https://github.com/facebookresearch/audiocraft)