Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,10 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import fitz # PyMuPDF
|
| 3 |
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
| 4 |
-
|
|
|
|
| 5 |
# Load the LLaMA model and tokenizer
|
| 6 |
-
model_name = "meta-llama/Meta-Llama-Guard-2-8B" # Update this with the correct LLaMA model name
|
| 7 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 8 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 9 |
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import fitz # PyMuPDF
|
| 3 |
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
| 4 |
+
# Load model directly
|
| 5 |
+
model_name = "openai-community/gpt2"
|
| 6 |
# Load the LLaMA model and tokenizer
|
| 7 |
+
#model_name = "meta-llama/Meta-Llama-Guard-2-8B" # Update this with the correct LLaMA model name
|
| 8 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 9 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 10 |
|