Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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.
|
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
|
66 |
-
response = respond_to_question(transcript_output
|
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:
|