Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -130,6 +130,8 @@ def respond_cool(message, history, mom_type):
|
|
130 |
)
|
131 |
return response['choices'][0]['message']['content'].strip()
|
132 |
|
|
|
|
|
133 |
def respond_tutor(message, history, mom_type):
|
134 |
top_tutor_results = get_top_chunks(message, tutor_chunk_embeddings, cleaned_tutor_chunks)
|
135 |
#str_chunks = "\n".join(best_chunks)
|
@@ -174,7 +176,7 @@ def respond_strict(message, history):
|
|
174 |
)
|
175 |
return response['choices'][0]['message']['content'].strip()
|
176 |
|
177 |
-
with gr.Blocks() as
|
178 |
|
179 |
with gr.Row():
|
180 |
mom_type = gr.CheckboxGroup(['Cool Mom', 'Tutor Mom', 'Strict Mom'],label='Choose Your Mom')
|
@@ -185,4 +187,4 @@ def respond_strict(message, history):
|
|
185 |
title="StudyMama"
|
186 |
)
|
187 |
|
188 |
-
|
|
|
130 |
)
|
131 |
return response['choices'][0]['message']['content'].strip()
|
132 |
|
133 |
+
chatbot = gr.ChatInterface(respond, type="messages")
|
134 |
+
|
135 |
def respond_tutor(message, history, mom_type):
|
136 |
top_tutor_results = get_top_chunks(message, tutor_chunk_embeddings, cleaned_tutor_chunks)
|
137 |
#str_chunks = "\n".join(best_chunks)
|
|
|
176 |
)
|
177 |
return response['choices'][0]['message']['content'].strip()
|
178 |
|
179 |
+
with gr.Blocks() as chatbot:
|
180 |
|
181 |
with gr.Row():
|
182 |
mom_type = gr.CheckboxGroup(['Cool Mom', 'Tutor Mom', 'Strict Mom'],label='Choose Your Mom')
|
|
|
187 |
title="StudyMama"
|
188 |
)
|
189 |
|
190 |
+
chatbot.launch()
|