Isidorophp commited on
Commit
9f0f392
·
verified ·
1 Parent(s): 21e2ad8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -16
app.py CHANGED
@@ -51,18 +51,7 @@ def model(text):
51
 
52
  return output
53
 
54
- #def number_to_words(str):
55
- # words = str.split(' ')
56
- # result = []
57
- #
58
- # for word in words:
59
- # if( any(char.isdigit() for char in word) ):
60
- # word = number_to_word.number_to_words(word)
61
- #
62
- # result.append(word)
63
- #
64
- # final_result = ' '.join(result).replace('point', '')
65
- # return final_result
66
 
67
  async def respond(audio):
68
  user = transcribe(audio)
@@ -123,12 +112,10 @@ with gr.Blocks(css="style.css") as demo:
123
  output = gr.Audio(label="WATSON", type="filepath", interactive=False, autoplay=True, elem_classes="audio")
124
  gr.Interface(fn=respond, inputs=[input], outputs=[output], live=True)
125
 
126
- #with gr.Row():
127
- # translate_btn = gr.Button("Response")
128
- # translate_btn.click(fn=respond, inputs=[input], outputs=[output], api_name=False)
129
 
130
  with gr.Row():
131
- user_input = gr.Textbox(label="Your Question", value="Dr. Watson can you summarize your adventures with Sherlock Holmes?")
132
  input_text = gr.Textbox(label="Input Text", elem_id="important")
133
  output_audio = gr.Audio(label="WATSON", type="filepath", interactive=False, autoplay=True, elem_classes="audio")
134
  with gr.Row():
 
51
 
52
  return output
53
 
54
+
 
 
 
 
 
 
 
 
 
 
 
55
 
56
  async def respond(audio):
57
  user = transcribe(audio)
 
112
  output = gr.Audio(label="WATSON", type="filepath", interactive=False, autoplay=True, elem_classes="audio")
113
  gr.Interface(fn=respond, inputs=[input], outputs=[output], live=True)
114
 
115
+
 
 
116
 
117
  with gr.Row():
118
+ user_input = gr.Textbox(label="Your Question", value="Dr. Watson, can you summarize your adventures with Sherlock Holmes?")
119
  input_text = gr.Textbox(label="Input Text", elem_id="important")
120
  output_audio = gr.Audio(label="WATSON", type="filepath", interactive=False, autoplay=True, elem_classes="audio")
121
  with gr.Row():