Commit
·
9867c26
1
Parent(s):
c2567b3
phi2 chatbot
Browse files
app.py
CHANGED
|
@@ -88,7 +88,7 @@ if prompt := st.chat_input():
|
|
| 88 |
st.write(response)
|
| 89 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
| 90 |
|
| 91 |
-
# Sidebar with model information
|
| 92 |
with st.sidebar:
|
| 93 |
st.title("About")
|
| 94 |
st.markdown("""
|
|
@@ -96,4 +96,20 @@ with st.sidebar:
|
|
| 96 |
trained using the QLoRA technique. The model has been optimized for
|
| 97 |
specific conversational tasks while maintaining efficiency through
|
| 98 |
parameter-efficient fine-tuning.
|
| 99 |
-
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
st.write(response)
|
| 89 |
st.session_state.messages.append({"role": "assistant", "content": response})
|
| 90 |
|
| 91 |
+
# Sidebar with model information and example prompts
|
| 92 |
with st.sidebar:
|
| 93 |
st.title("About")
|
| 94 |
st.markdown("""
|
|
|
|
| 96 |
trained using the QLoRA technique. The model has been optimized for
|
| 97 |
specific conversational tasks while maintaining efficiency through
|
| 98 |
parameter-efficient fine-tuning.
|
| 99 |
+
""")
|
| 100 |
+
|
| 101 |
+
st.title("Example Prompts")
|
| 102 |
+
example_prompts = [
|
| 103 |
+
"Can you explain how quantum computing works in simple terms?",
|
| 104 |
+
"Write a short story about a robot learning to feel emotions.",
|
| 105 |
+
"What are the main differences between Python and JavaScript?",
|
| 106 |
+
"Give me some tips for improving my public speaking skills.",
|
| 107 |
+
"Explain the concept of climate change to a 10-year-old."
|
| 108 |
+
]
|
| 109 |
+
|
| 110 |
+
st.markdown("### Try these prompts to get started:")
|
| 111 |
+
for prompt in example_prompts:
|
| 112 |
+
if st.button(f"📝 {prompt}", key=prompt):
|
| 113 |
+
st.session_state.messages.append({"role": "user", "content": prompt})
|
| 114 |
+
# Ensure the prompt appears in the main chat area
|
| 115 |
+
st.experimental_rerun()
|