Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,7 @@ def synthesise(text):
|
|
62 |
return outputs.audio[0]
|
63 |
|
64 |
|
65 |
-
def gpt_predict(inputs, request:gr.Request, top_p = 1, temperature = 1, chat_counter = 0,history =[]):
|
66 |
payload = {
|
67 |
"model": MODEL,
|
68 |
"messages": [{"role": "user", "content": f"{inputs}"}],
|
@@ -190,6 +190,7 @@ demo = gr.Interface(
|
|
190 |
gr.Audio(label="Import an audio", sources="upload", type="filepath"),
|
191 |
#gr.Audio(label="Import an audio", sources="upload", type="numpy"),
|
192 |
gr.Audio(label="Record an audio", sources="microphone", type="filepath"),
|
|
|
193 |
],
|
194 |
outputs=[
|
195 |
gr.Text(label="Text translation or gpt answer"),gr.Audio(label="Audio translation",type = "numpy")
|
|
|
62 |
return outputs.audio[0]
|
63 |
|
64 |
|
65 |
+
def gpt_predict(inputs, request:gr.Request=gr.State([]), top_p = 1, temperature = 1, chat_counter = 0,history =[]):
|
66 |
payload = {
|
67 |
"model": MODEL,
|
68 |
"messages": [{"role": "user", "content": f"{inputs}"}],
|
|
|
190 |
gr.Audio(label="Import an audio", sources="upload", type="filepath"),
|
191 |
#gr.Audio(label="Import an audio", sources="upload", type="numpy"),
|
192 |
gr.Audio(label="Record an audio", sources="microphone", type="filepath"),
|
193 |
+
|
194 |
],
|
195 |
outputs=[
|
196 |
gr.Text(label="Text translation or gpt answer"),gr.Audio(label="Audio translation",type = "numpy")
|