KleinPenny commited on
Commit
ea1feff
·
verified ·
1 Parent(s): a09c8c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -4
app.py CHANGED
@@ -95,7 +95,7 @@ def respond(
95
  response += token
96
 
97
  llama_responded = 1
98
- return response #gr.Audio("/home/yxpeng/Projects/RAGHack/Exodia/voice_sample/trump1.wav")
99
 
100
  def update_response_display():
101
  while not llama_responded:
@@ -109,14 +109,22 @@ def bot(history):
109
 
110
  return history
111
 
 
 
 
 
 
112
  def create_interface():
113
  with gr.Blocks() as demo:
114
-
115
- # Title
116
- gr.Markdown("# Exodia AI Assistant")
117
 
 
 
 
 
118
  # Chat interface using the custom chatbot instance
119
  chatbot = gr.ChatInterface(
 
 
120
  fn=respond,
121
  submit_btn="Start Chatting"
122
  )
 
95
  response += token
96
 
97
  llama_responded = 1
98
+ return response
99
 
100
  def update_response_display():
101
  while not llama_responded:
 
109
 
110
  return history
111
 
112
+ def load():
113
+ return [None,
114
+ ("Here's an audio", gr.Audio("01.wav"))
115
+ ]
116
+
117
  def create_interface():
118
  with gr.Blocks() as demo:
 
 
 
119
 
120
+ chatbot1 = gr.Chatbot()
121
+ button = gr.Button("Load audio and video")
122
+ button.click(load, None, chatbot1)
123
+
124
  # Chat interface using the custom chatbot instance
125
  chatbot = gr.ChatInterface(
126
+ title="Exodia AI Assistant",
127
+ fill_height=True,
128
  fn=respond,
129
  submit_btn="Start Chatting"
130
  )