sanarawal7
commited on
Commit
·
1a76cb5
1
Parent(s):
dc7fb46
again
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ hf_api_token = "HF_API_KEY"
|
|
8 |
# Load the model and tokenizer globally, not inside the function
|
9 |
model_name = "allenai/Molmo-7B-D-0924"
|
10 |
tokenizer = AutoTokenizer.from_pretrained(model_name, use_auth_token=hf_api_token)
|
11 |
-
model = AutoModelForQuestionAnswering.from_pretrained(model_name, use_auth_token=hf_api_token)
|
12 |
|
13 |
def generate_questions(file_content):
|
14 |
# Preprocess file content (assuming it's already text)
|
|
|
8 |
# Load the model and tokenizer globally, not inside the function
|
9 |
model_name = "allenai/Molmo-7B-D-0924"
|
10 |
tokenizer = AutoTokenizer.from_pretrained(model_name, use_auth_token=hf_api_token)
|
11 |
+
model = AutoModelForQuestionAnswering.from_pretrained(model_name, trust_remote_code=True,use_auth_token=hf_api_token)
|
12 |
|
13 |
def generate_questions(file_content):
|
14 |
# Preprocess file content (assuming it's already text)
|