Spaces:
Sleeping
Sleeping
Jonas Wiesli
commited on
Commit
•
2dbfe8d
1
Parent(s):
558f04c
added type casting
Browse files
app.py
CHANGED
@@ -84,9 +84,9 @@ with gr.Blocks() as iface:
|
|
84 |
return completion.choices[0].message.content
|
85 |
|
86 |
def updateQuestions(prevText):
|
87 |
-
remainingQuestions = prevText["label"].split(": ")[1]
|
88 |
remainingQuestions -= 1
|
89 |
-
return "Remaining Questions: " + remainingQuestions
|
90 |
|
91 |
# again, ugly workaround
|
92 |
msg[0].submit(user, [msg[0], chatbot[0]], [msg[0], chatbot[0]], queue=False).then(
|
|
|
84 |
return completion.choices[0].message.content
|
85 |
|
86 |
def updateQuestions(prevText):
|
87 |
+
remainingQuestions = int(prevText["label"].split(": ")[1])
|
88 |
remainingQuestions -= 1
|
89 |
+
return "Remaining Questions: " + str(remainingQuestions)
|
90 |
|
91 |
# again, ugly workaround
|
92 |
msg[0].submit(user, [msg[0], chatbot[0]], [msg[0], chatbot[0]], queue=False).then(
|