Isidorophp commited on
Commit
e4afe69
·
verified ·
1 Parent(s): 1e4baaf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -112,10 +112,9 @@ async def generate1(prompt):
112
  await communicate.save(tmp_path)
113
  yield tmp_path
114
 
115
- with gr.Blocks(css="style.css") as demo:
116
- gr.Image("/file=https://huggingface.co/spaces/Isidorophp/Talk-to-Dr.Watson/resolve/main/logo.png")
117
-
118
- gr.Markdown(""" # <center><img src='https://huggingface.co/spaces/Isidorophp/Talk-to-Dr.Watson/resolve/main/logo.png' alt='RJP DEV STUDIO logo'></center>""")
119
  gr.Markdown(""" # <center><b> DR. Watson 🤖 🧠 🧬</b></center>
120
  ### <center>An Artificial Intelligence Assistant just for YOU:
121
  ### <center>Now Talk to - Dr. Watson</center>
@@ -123,18 +122,18 @@ with gr.Blocks(css="style.css") as demo:
123
 
124
 
125
  with gr.Row():
126
- user_input = gr.Audio(label="Voice Chat", type="filepath")
127
  output_audio = gr.Audio(label="WATSON", type="filepath",
128
- interactive=False,
129
  autoplay=True,
130
- elem_classes="audio")
131
  with gr.Row():
132
  translate_btn = gr.Button("Response")
133
  translate_btn.click(fn=respond, inputs=user_input,
134
  outputs=output_audio, api_name=False)
135
 
136
  with gr.Row():
137
- user_input = gr.Textbox(label="Prompt", value="Dr. Watson can you summarize your adventures with Sherlock Holmes?")
138
  input_text = gr.Textbox(label="Input Text", elem_id="important")
139
  output_audio = gr.Audio(label="WATSON", type="filepath",
140
  interactive=False,
@@ -148,4 +147,4 @@ with gr.Blocks(css="style.css") as demo:
148
 
149
 
150
  if __name__ == "__main__":
151
- demo.queue(max_size=200).launch()
 
112
  await communicate.save(tmp_path)
113
  yield tmp_path
114
 
115
+ with gr.Blocks(css="style.css") as demo:
116
+
117
+ gr.Markdown(""" # <center><img src='https://huggingface.co/spaces/Isidorophp/Talk-to-Dr.Watson/resolve/main/logo.png' alt='RJP DEV STUDIO logo' width="120" height="75"></center>""")
 
118
  gr.Markdown(""" # <center><b> DR. Watson 🤖 🧠 🧬</b></center>
119
  ### <center>An Artificial Intelligence Assistant just for YOU:
120
  ### <center>Now Talk to - Dr. Watson</center>
 
122
 
123
 
124
  with gr.Row():
125
+ user_input = gr.Audio(label="Your Voice Chat", type="filepath")
126
  output_audio = gr.Audio(label="WATSON", type="filepath",
127
+ interactive=True,
128
  autoplay=True,
129
+ elem_classes="microphone")
130
  with gr.Row():
131
  translate_btn = gr.Button("Response")
132
  translate_btn.click(fn=respond, inputs=user_input,
133
  outputs=output_audio, api_name=False)
134
 
135
  with gr.Row():
136
+ user_input = gr.Textbox(label="Your Question", value="Dr. Watson can you summarize your adventures with Sherlock Holmes?")
137
  input_text = gr.Textbox(label="Input Text", elem_id="important")
138
  output_audio = gr.Audio(label="WATSON", type="filepath",
139
  interactive=False,
 
147
 
148
 
149
  if __name__ == "__main__":
150
+ demo.queue(max_size=200).launch(share=True)