commonman commited on
Commit
fd7dc7b
·
1 Parent(s): 9dad127

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 edit it lightly to improve its grammar. Reduce repetiton of key ideas and take out any parts that don't contribute to the meaning of the piece. Keep as much of the wording of the original as you edit it lightly for clarity."}])
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="Therapists Advice")
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")