Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,17 +3,17 @@ from transformers import pipeline
|
|
| 3 |
from langchain.schema import AIMessage, HumanMessage, SystemMessage
|
| 4 |
|
| 5 |
st.set_page_config(page_title="LangChain Demo", page_icon=":robot:")
|
| 6 |
-
st.header("
|
| 7 |
|
| 8 |
if "sessionMessages" not in st.session_state:
|
| 9 |
st.session_state.sessionMessages = [
|
| 10 |
SystemMessage(content="You are a helpful customer support chatbot for a website.")
|
| 11 |
]
|
| 12 |
|
| 13 |
-
#
|
| 14 |
generator = pipeline(
|
| 15 |
"text-generation",
|
| 16 |
-
model="tiiuae/
|
| 17 |
device=-1, # CPU
|
| 18 |
max_new_tokens=256,
|
| 19 |
temperature=0.3
|
|
|
|
| 3 |
from langchain.schema import AIMessage, HumanMessage, SystemMessage
|
| 4 |
|
| 5 |
st.set_page_config(page_title="LangChain Demo", page_icon=":robot:")
|
| 6 |
+
st.header("Pequeno Chatbot - Matheus")
|
| 7 |
|
| 8 |
if "sessionMessages" not in st.session_state:
|
| 9 |
st.session_state.sessionMessages = [
|
| 10 |
SystemMessage(content="You are a helpful customer support chatbot for a website.")
|
| 11 |
]
|
| 12 |
|
| 13 |
+
# Load the Falcon3-1B-Instruct model
|
| 14 |
generator = pipeline(
|
| 15 |
"text-generation",
|
| 16 |
+
model="tiiuae/Falcon3-1B-Instruct",
|
| 17 |
device=-1, # CPU
|
| 18 |
max_new_tokens=256,
|
| 19 |
temperature=0.3
|