Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -140,10 +140,7 @@ def generate_text(
|
|
| 140 |
|
| 141 |
for response in stream:
|
| 142 |
output += response.token.text
|
| 143 |
-
yield output
|
| 144 |
-
|
| 145 |
-
audio_message = (pad_buffer, "This is an audio file")
|
| 146 |
-
history.append((None, audio_message))
|
| 147 |
|
| 148 |
password = str(passwordInput)
|
| 149 |
print("password = " + str(password))
|
|
@@ -176,7 +173,8 @@ with gr.ChatInterface(
|
|
| 176 |
additional_inputs=[passwordInput],
|
| 177 |
):
|
| 178 |
audioBlock = gr.Audio(autoplay=True, interactive=False)
|
| 179 |
-
audioBlock.value =
|
|
|
|
| 180 |
|
| 181 |
|
| 182 |
chat.launch(show_api=False)
|
|
|
|
| 140 |
|
| 141 |
for response in stream:
|
| 142 |
output += response.token.text
|
| 143 |
+
yield output
|
|
|
|
|
|
|
|
|
|
| 144 |
|
| 145 |
password = str(passwordInput)
|
| 146 |
print("password = " + str(password))
|
|
|
|
| 173 |
additional_inputs=[passwordInput],
|
| 174 |
):
|
| 175 |
audioBlock = gr.Audio(autoplay=True, interactive=False)
|
| 176 |
+
audioBlock.value = generate_text(prompt, history, passwordInput, temperature=0.2, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0
|
| 177 |
+
)
|
| 178 |
|
| 179 |
|
| 180 |
chat.launch(show_api=False)
|