Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -77,19 +77,19 @@ class VideoClassifier:
|
|
| 77 |
print(hf_auth)
|
| 78 |
model_config = transformers.AutoConfig.from_pretrained(
|
| 79 |
self.model_id,
|
| 80 |
-
use_auth_token=hf_auth
|
| 81 |
)
|
| 82 |
self.model = transformers.AutoModelForCausalLM.from_pretrained(
|
| 83 |
self.model_id,
|
| 84 |
trust_remote_code=True,
|
| 85 |
config=model_config,
|
| 86 |
quantization_config=bnb_config,
|
| 87 |
-
use_auth_token=hf_auth
|
| 88 |
)
|
| 89 |
self.model.eval()
|
| 90 |
self.tokenizer = transformers.AutoTokenizer.from_pretrained(
|
| 91 |
self.model_id,
|
| 92 |
-
use_auth_token=hf_auth
|
| 93 |
)
|
| 94 |
self.generate_text = transformers.pipeline(
|
| 95 |
model=self.model, tokenizer=self.tokenizer,
|
|
@@ -308,7 +308,7 @@ class VideoClassifier:
|
|
| 308 |
self.model_name = model_name
|
| 309 |
if self.model_name=='mistral':
|
| 310 |
print("Setting up Mistral model for Class Selection")
|
| 311 |
-
self.
|
| 312 |
else :
|
| 313 |
print("Setting up Gemini model for Class Selection")
|
| 314 |
self.setup_gemini_model()
|
|
|
|
| 77 |
print(hf_auth)
|
| 78 |
model_config = transformers.AutoConfig.from_pretrained(
|
| 79 |
self.model_id,
|
| 80 |
+
# use_auth_token=hf_auth
|
| 81 |
)
|
| 82 |
self.model = transformers.AutoModelForCausalLM.from_pretrained(
|
| 83 |
self.model_id,
|
| 84 |
trust_remote_code=True,
|
| 85 |
config=model_config,
|
| 86 |
quantization_config=bnb_config,
|
| 87 |
+
# use_auth_token=hf_auth
|
| 88 |
)
|
| 89 |
self.model.eval()
|
| 90 |
self.tokenizer = transformers.AutoTokenizer.from_pretrained(
|
| 91 |
self.model_id,
|
| 92 |
+
# use_auth_token=hf_auth
|
| 93 |
)
|
| 94 |
self.generate_text = transformers.pipeline(
|
| 95 |
model=self.model, tokenizer=self.tokenizer,
|
|
|
|
| 308 |
self.model_name = model_name
|
| 309 |
if self.model_name=='mistral':
|
| 310 |
print("Setting up Mistral model for Class Selection")
|
| 311 |
+
self.setup_mistral_model()
|
| 312 |
else :
|
| 313 |
print("Setting up Gemini model for Class Selection")
|
| 314 |
self.setup_gemini_model()
|