Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -99,11 +99,11 @@ def transcribe(audio, history_type):
|
|
| 99 |
|
| 100 |
#Ask OpenAI to create note transcript
|
| 101 |
## 1.1.1
|
| 102 |
-
response = client.chat.completions.create(model="gpt-
|
| 103 |
note_transcript = response.choices[0].message.content
|
| 104 |
|
| 105 |
print(note_transcript)
|
| 106 |
-
return [note_transcript, num_words
|
| 107 |
|
| 108 |
#Define Gradio Interface
|
| 109 |
my_inputs = [
|
|
@@ -114,9 +114,9 @@ my_inputs = [
|
|
| 114 |
|
| 115 |
ui = gr.Interface(fn=transcribe,
|
| 116 |
inputs=my_inputs,
|
| 117 |
-
outputs=[gr.Textbox(label="Your Note", show_copy_button=True),
|
| 118 |
gr.Number(label="Audio Word Count"),
|
| 119 |
-
|
| 120 |
|
| 121 |
|
| 122 |
ui.launch(share=False, debug=True)
|
|
|
|
| 99 |
|
| 100 |
#Ask OpenAI to create note transcript
|
| 101 |
## 1.1.1
|
| 102 |
+
response = client.chat.completions.create(model="gpt-4o", temperature=0, messages=messages)
|
| 103 |
note_transcript = response.choices[0].message.content
|
| 104 |
|
| 105 |
print(note_transcript)
|
| 106 |
+
return [note_transcript, num_words]
|
| 107 |
|
| 108 |
#Define Gradio Interface
|
| 109 |
my_inputs = [
|
|
|
|
| 114 |
|
| 115 |
ui = gr.Interface(fn=transcribe,
|
| 116 |
inputs=my_inputs,
|
| 117 |
+
outputs=[gr.Textbox(label="Your Note (gpt-4o)", show_copy_button=True),
|
| 118 |
gr.Number(label="Audio Word Count"),
|
| 119 |
+
])
|
| 120 |
|
| 121 |
|
| 122 |
ui.launch(share=False, debug=True)
|