Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ with gr.Blocks() as demo:
|
|
| 42 |
# First message as instructions to OpenAI
|
| 43 |
# Establishes a State object to create a
|
| 44 |
# unique state for each user and on reload
|
| 45 |
-
messages = gr.State(value=[{"role": "system", "content": "You are an expert editor. You should take the text submitted and
|
| 46 |
|
| 47 |
# Takes the users transcribed audio as a string
|
| 48 |
# Takes the messages list as a reference
|
|
@@ -100,7 +100,7 @@ with gr.Blocks() as demo:
|
|
| 100 |
user_audio = gr.Audio(source="microphone", type="filepath", label="Input Phrase")
|
| 101 |
submit_btn = gr.Button(value="Transcribe Audio")
|
| 102 |
submit_btn2 = gr.Button(value="Submit Text")
|
| 103 |
-
gpt_voice = gr.Audio(label="
|
| 104 |
with gr.Column(scale=2):
|
| 105 |
user_transcript = gr.Text(label="Audio Translation", interactive=False)
|
| 106 |
user_text = gr.Text(label="Text Input")
|
|
|
|
| 42 |
# First message as instructions to OpenAI
|
| 43 |
# Establishes a State object to create a
|
| 44 |
# unique state for each user and on reload
|
| 45 |
+
messages = gr.State(value=[{"role": "system", "content": "You are an expert editor. You should take the text submitted and offer three responses back. The first is a newspaper-style headline of the submtted text. The second is a brief summary of the text. And the third is the full text exactly as given."}])
|
| 46 |
|
| 47 |
# Takes the users transcribed audio as a string
|
| 48 |
# Takes the messages list as a reference
|
|
|
|
| 100 |
user_audio = gr.Audio(source="microphone", type="filepath", label="Input Phrase")
|
| 101 |
submit_btn = gr.Button(value="Transcribe Audio")
|
| 102 |
submit_btn2 = gr.Button(value="Submit Text")
|
| 103 |
+
gpt_voice = gr.Audio(label="Play Voice")
|
| 104 |
with gr.Column(scale=2):
|
| 105 |
user_transcript = gr.Text(label="Audio Translation", interactive=False)
|
| 106 |
user_text = gr.Text(label="Text Input")
|