Spaces:
Runtime error
Runtime error
Commit
·
d671351
1
Parent(s):
6723cb0
- .gitignore +1 -0
- __pycache__/secrets.cpython-313.pyc +0 -0
- app.py +4 -2
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
secrets.py
|
__pycache__/secrets.cpython-313.pyc
ADDED
Binary file (449 Bytes). View file
|
|
app.py
CHANGED
@@ -3,12 +3,12 @@ from langchain_community.llms import Ollama
|
|
3 |
from transformers import pipeline
|
4 |
from huggingface_hub import login
|
5 |
import os
|
|
|
6 |
|
7 |
|
8 |
-
hf_token = os.getenv("MODEL_REPO_ID")
|
9 |
|
10 |
# Log in with the token
|
11 |
-
login(token=
|
12 |
|
13 |
|
14 |
|
@@ -25,3 +25,5 @@ if st.button("Generate Response"):
|
|
25 |
# Display the result in the Streamlit app
|
26 |
st.write("Response:")
|
27 |
st.write(response)
|
|
|
|
|
|
3 |
from transformers import pipeline
|
4 |
from huggingface_hub import login
|
5 |
import os
|
6 |
+
from secrets import Token
|
7 |
|
8 |
|
|
|
9 |
|
10 |
# Log in with the token
|
11 |
+
login(token=Token.token)
|
12 |
|
13 |
|
14 |
|
|
|
25 |
# Display the result in the Streamlit app
|
26 |
st.write("Response:")
|
27 |
st.write(response)
|
28 |
+
|
29 |
+
|