Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -30,17 +30,15 @@ with gr.Blocks() as demo:
|
|
30 |
with gr.Accordion("Click for Instructions:"):
|
31 |
gr.Markdown(
|
32 |
"""
|
33 |
-
*
|
34 |
-
* Submit your query, and follow the chat or listen to the Therapists advice.
|
35 |
-
* When you are ready to respond, clear your last recording and resubmit.
|
36 |
-
note: Transcribe Audio does not work on iOS
|
37 |
""")
|
38 |
|
39 |
|
40 |
# First message as instructions to OpenAI
|
41 |
# Establishes a State object to create a
|
42 |
# unique state for each user and on reload
|
43 |
-
messages = gr.State(value=[{"role": "system", "content": "You are a therapist. Respond in less than 5 sentences."}])
|
|
|
44 |
|
45 |
# Takes the users transcribed audio as a string
|
46 |
# Takes the messages list as a reference
|
@@ -68,7 +66,7 @@ with gr.Blocks() as demo:
|
|
68 |
for message in messages:
|
69 |
if (message["role"] != "system"):
|
70 |
chat_transcript += message["role"] + ": " + message["content"] + "\n\n"
|
71 |
-
|
72 |
return chat_transcript
|
73 |
|
74 |
# Gets the last message in the
|
|
|
30 |
with gr.Accordion("Click for Instructions:"):
|
31 |
gr.Markdown(
|
32 |
"""
|
33 |
+
* Dime en lo que te puedo ayudar
|
|
|
|
|
|
|
34 |
""")
|
35 |
|
36 |
|
37 |
# First message as instructions to OpenAI
|
38 |
# Establishes a State object to create a
|
39 |
# unique state for each user and on reload
|
40 |
+
#DGG messages = gr.State(value=[{"role": "system", "content": "You are a therapist. Respond in less than 5 sentences."}])
|
41 |
+
messages = gr.State(value=[{"role": "system", "content": "Eres un cajero bancario. Responde brevemente."}])
|
42 |
|
43 |
# Takes the users transcribed audio as a string
|
44 |
# Takes the messages list as a reference
|
|
|
66 |
for message in messages:
|
67 |
if (message["role"] != "system"):
|
68 |
chat_transcript += message["role"] + ": " + message["content"] + "\n\n"
|
69 |
+
print chat_transcript#DGG
|
70 |
return chat_transcript
|
71 |
|
72 |
# Gets the last message in the
|