Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,9 +27,11 @@ repo_id = "mistralai/Mistral-7B-Instruct-v0.3"
|
|
27 |
|
28 |
from huggingface_hub import login
|
29 |
login(token=st.secrets["HF_TOKEN"])
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
33 |
|
34 |
dataset= load_dataset("test-1.pdf")
|
35 |
loader = PyPDFLoader(dataset)
|
|
|
27 |
|
28 |
from huggingface_hub import login
|
29 |
login(token=st.secrets["HF_TOKEN"])
|
30 |
+
# Load model directly
|
31 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
32 |
+
|
33 |
+
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
|
34 |
+
model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
|
35 |
|
36 |
dataset= load_dataset("test-1.pdf")
|
37 |
loader = PyPDFLoader(dataset)
|