Spaces:
Runtime error
Runtime error
Commit
•
00a9ccd
1
Parent(s):
f271e1e
Update app.py
Browse files
app.py
CHANGED
@@ -53,13 +53,13 @@ class VideoClassifier:
|
|
53 |
self.img_cap = Caption()
|
54 |
|
55 |
def setup_mistral_space_model(self):
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
|
64 |
|
65 |
def setup_mistral_model(self):
|
|
|
53 |
self.img_cap = Caption()
|
54 |
|
55 |
def setup_mistral_space_model(self):
|
56 |
+
if not self.hf_key:
|
57 |
+
raise ValueError("Hugging Face API key is not set or invalid.")
|
58 |
+
|
59 |
+
self.client = InferenceClient("mistralai/Mistral-7B-Instruct-v0.2", api_token=self.hf_key)
|
60 |
+
|
61 |
+
self.whisper_model = whisper.load_model("base")
|
62 |
+
self.img_cap = Caption()
|
63 |
|
64 |
|
65 |
def setup_mistral_model(self):
|