Spaces:
Sleeping
Sleeping
Update chatbot_page.py
Browse files- chatbot_page.py +3 -2
chatbot_page.py
CHANGED
|
@@ -69,9 +69,10 @@ def extract_keywords_from_conversation(history):
|
|
| 69 |
with gr.Blocks() as chatbot_demo:
|
| 70 |
gr.Markdown("## Repo Recommendation Chatbot")
|
| 71 |
chatbot = gr.Chatbot()
|
| 72 |
-
# Initial assistant message
|
| 73 |
initial_message = "Hello! Please tell me about your ideal Hugging Face repo. What use case, preferred language, or features are you looking for?"
|
| 74 |
-
|
|
|
|
| 75 |
user_input = gr.Textbox(label="Your message", placeholder="Describe your ideal repo or answer the assistant's questions...")
|
| 76 |
send_btn = gr.Button("Send")
|
| 77 |
end_btn = gr.Button("End Chat and Extract Keywords")
|
|
|
|
| 69 |
with gr.Blocks() as chatbot_demo:
|
| 70 |
gr.Markdown("## Repo Recommendation Chatbot")
|
| 71 |
chatbot = gr.Chatbot()
|
| 72 |
+
# Initial assistant message and dummy question
|
| 73 |
initial_message = "Hello! Please tell me about your ideal Hugging Face repo. What use case, preferred language, or features are you looking for?"
|
| 74 |
+
dummy_question = "What kind of project or task are you interested in?"
|
| 75 |
+
state = gr.State([["", initial_message], ["", dummy_question]]) # Start with assistant message and question
|
| 76 |
user_input = gr.Textbox(label="Your message", placeholder="Describe your ideal repo or answer the assistant's questions...")
|
| 77 |
send_btn = gr.Button("Send")
|
| 78 |
end_btn = gr.Button("End Chat and Extract Keywords")
|