Spaces:
Runtime error
Runtime error
Commit
•
c2fc498
1
Parent(s):
a684f27
Update app.py
Browse files
app.py
CHANGED
@@ -206,9 +206,11 @@ class VideoClassifier:
|
|
206 |
# print(f"Current model in use: {self.model}")
|
207 |
if self.model_name=='mistral':
|
208 |
try:
|
|
|
209 |
chain1 = LLMChain(llm=self.llm, prompt=prompt1)
|
210 |
main_class = chain1.predict(main_categories=main_categories, transcript=transcript, captions=captions)
|
211 |
except:
|
|
|
212 |
prompt1 = template1.format(main_categories=main_categories, transcript=transcript, captions=captions)
|
213 |
messages = [{"role": "user", "content": prompt1}]
|
214 |
stream = self.client.chat_completion(messages, max_tokens=100)
|
|
|
206 |
# print(f"Current model in use: {self.model}")
|
207 |
if self.model_name=='mistral':
|
208 |
try:
|
209 |
+
print("Entering mistral chain approach")
|
210 |
chain1 = LLMChain(llm=self.llm, prompt=prompt1)
|
211 |
main_class = chain1.predict(main_categories=main_categories, transcript=transcript, captions=captions)
|
212 |
except:
|
213 |
+
print("Entering mistral template approach")
|
214 |
prompt1 = template1.format(main_categories=main_categories, transcript=transcript, captions=captions)
|
215 |
messages = [{"role": "user", "content": prompt1}]
|
216 |
stream = self.client.chat_completion(messages, max_tokens=100)
|