Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -49,12 +49,17 @@ def generate_response(message, selected_topics):
|
|
49 |
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
50 |
return response
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
# Run the app
|
60 |
if __name__ == "__main__":
|
|
|
49 |
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
50 |
return response
|
51 |
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
+
dropdown = gr.components.Dropdown(choices=topics_list, label="Select Topics", allow_multiple=True)
|
56 |
+
|
57 |
+
iface = gr.ChatInterface(
|
58 |
+
fn=generate_response,
|
59 |
+
title="Child-Safe Chatbot BETA",
|
60 |
+
additional_inputs=[dropdown],
|
61 |
+
description="A chatbot that stays on topic and filters inappropriate content. Select relevant topics.",
|
62 |
+
)
|
63 |
|
64 |
# Run the app
|
65 |
if __name__ == "__main__":
|