Spaces:
Runtime error
Runtime error
arjunanand13
commited on
Commit
•
4ef4ed1
1
Parent(s):
8d630c8
Update app.py
Browse files
app.py
CHANGED
@@ -194,13 +194,13 @@ class VideoClassifier:
|
|
194 |
}
|
195 |
|
196 |
def get_classification():
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
|
205 |
template1 = '''Given below are the different type of main video classes
|
206 |
{main_categories}
|
|
|
194 |
}
|
195 |
|
196 |
def get_classification():
|
197 |
+
messages = [{"role": "user", "content": prompt1}]
|
198 |
+
try:
|
199 |
+
stream = self.client.chat_completion(messages, max_tokens=100)
|
200 |
+
main_class = stream.choices[0].message.content.strip()
|
201 |
+
except Exception as e:
|
202 |
+
main_class = f"Error: {str(e)}"
|
203 |
+
output_queue.put(main_class)
|
204 |
|
205 |
template1 = '''Given below are the different type of main video classes
|
206 |
{main_categories}
|