Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,17 @@
|
|
| 1 |
# Use a pipeline as a high-level helper
|
| 2 |
from transformers import pipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
messages = [
|
| 5 |
-
{"role": "user", "content":
|
| 6 |
]
|
| 7 |
pipe = pipeline("text-generation", model="deepseek-ai/DeepSeek-R1-Zero", trust_remote_code=True)
|
| 8 |
-
|
|
|
|
|
|
|
|
|
| 1 |
# Use a pipeline as a high-level helper
|
| 2 |
from transformers import pipeline
|
| 3 |
+
import streamlit as st
|
| 4 |
+
|
| 5 |
+
st.title("AI Chatbot")
|
| 6 |
+
|
| 7 |
+
st.write("Ask the AI a question and get an answer!")
|
| 8 |
+
|
| 9 |
+
user_question = st.chat_input("Enter your question:")
|
| 10 |
|
| 11 |
messages = [
|
| 12 |
+
{"role": "user", "content": user_question},
|
| 13 |
]
|
| 14 |
pipe = pipeline("text-generation", model="deepseek-ai/DeepSeek-R1-Zero", trust_remote_code=True)
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
st.write(pipe(messages))
|