gorkemgoknar commited on
Commit
4be7052
·
1 Parent(s): d31e207

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -192,27 +192,27 @@ examples=[['Gandalf','dragon.wav','Who are you sir?',{}]]
192
 
193
  history = {"character": "None", "message_history" : [] }
194
 
195
- interface_mic= gr.Interface(fn=greet,
196
  inputs=[gr.inputs.Dropdown(personality_choices),
197
  gr.inputs.Audio(source="microphone", type="filepath") ,
198
  "text",
199
  "state"],
200
  outputs=["html","state",gr.outputs.Audio(type="file")],
201
  css=css, title=title, description=description,article=article )
202
- interface_file= gr.Interface(fn=greet,
203
  inputs=[gr.inputs.Dropdown(personality_choices),
204
  gr.inputs.Audio(type="filepath"),
205
  "text",
206
  "state"],
207
  outputs=["html","state",gr.outputs.Audio(type="file")],
208
  css=css, title=title, description=description,article=article )
209
- interface_text= gr.Interface(fn=greet_textonly,
210
  inputs=[gr.inputs.Dropdown(personality_choices),
211
  "text",
212
  "state"],
213
  outputs=["html","state"],
214
  css=css, title=title, description=description,article=article )
215
 
216
- #appinterface = gr.TabbedInterface([interface_mic, interface_file, interface_text], ["Chat with Record", "Chat with File Upload", "Chat Text only"])
217
  if __name__ == "__main__":
218
- interface_file.launch()
 
192
 
193
  history = {"character": "None", "message_history" : [] }
194
 
195
+ interface_mic= gr.Interface.load(fn=greet,
196
  inputs=[gr.inputs.Dropdown(personality_choices),
197
  gr.inputs.Audio(source="microphone", type="filepath") ,
198
  "text",
199
  "state"],
200
  outputs=["html","state",gr.outputs.Audio(type="file")],
201
  css=css, title=title, description=description,article=article )
202
+ interface_file= gr.Interface.load(fn=greet,
203
  inputs=[gr.inputs.Dropdown(personality_choices),
204
  gr.inputs.Audio(type="filepath"),
205
  "text",
206
  "state"],
207
  outputs=["html","state",gr.outputs.Audio(type="file")],
208
  css=css, title=title, description=description,article=article )
209
+ interface_text= gr.Interface.load(fn=greet_textonly,
210
  inputs=[gr.inputs.Dropdown(personality_choices),
211
  "text",
212
  "state"],
213
  outputs=["html","state"],
214
  css=css, title=title, description=description,article=article )
215
 
216
+ appinterface = gr.TabbedInterface([interface_mic, interface_file, interface_text], ["Chat with Record", "Chat with File Upload", "Chat Text only"])
217
  if __name__ == "__main__":
218
+ appinterface.launch()