Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import streamlit as st
|
2 |
-
from transformers import AutoTokenizer,
|
3 |
|
4 |
# Create a class for the session state
|
5 |
class SessionState:
|
@@ -18,7 +18,7 @@ temperature = st.sidebar.slider("Temperature", 0.0, 1.0, 0.7)
|
|
18 |
# Load the model and tokenizer with a loading message
|
19 |
with st.spinner('Wait for model to respond..'):
|
20 |
model_name = "llmware/bling-red-pajamas-3b-0.1"
|
21 |
-
model =
|
22 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
23 |
|
24 |
# Create a chat input for the user
|
|
|
1 |
import streamlit as st
|
2 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
3 |
|
4 |
# Create a class for the session state
|
5 |
class SessionState:
|
|
|
18 |
# Load the model and tokenizer with a loading message
|
19 |
with st.spinner('Wait for model to respond..'):
|
20 |
model_name = "llmware/bling-red-pajamas-3b-0.1"
|
21 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
22 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
23 |
|
24 |
# Create a chat input for the user
|