avfranco commited on
Commit
1a99cb6
1 Parent(s): 791441a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -28,7 +28,7 @@ def respond_to_question(transcript, question):
28
  response = openai.Completion.create(
29
  engine="text-davinci-002",
30
  prompt=f"Transcript: {transcript}\n\nUser: {question}\n\nAI:",
31
- temperature=0.7,
32
  max_tokens=60,
33
  top_p=1,
34
  frequency_penalty=0,
@@ -62,8 +62,8 @@ with gr.Blocks() as transcriberUI:
62
  return text
63
 
64
  def ask_question_callback(transcribe_output,ask_question):
65
- if ask_question.value:
66
- response = respond_to_question(transcript_output.value, ask_question.value)
67
  response_output.visible = True
68
  response_output.value = response
69
  else:
 
28
  response = openai.Completion.create(
29
  engine="text-davinci-002",
30
  prompt=f"Transcript: {transcript}\n\nUser: {question}\n\nAI:",
31
+ temperature=0.3,
32
  max_tokens=60,
33
  top_p=1,
34
  frequency_penalty=0,
 
62
  return text
63
 
64
  def ask_question_callback(transcribe_output,ask_question):
65
+ if ask_question:
66
+ response = respond_to_question(transcript_output, ask_question)
67
  response_output.visible = True
68
  response_output.value = response
69
  else: