Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import
|
3 |
import tempfile
|
4 |
import numpy as np
|
5 |
|
6 |
# Initialize LLaMA Model for Question Answering
|
7 |
-
|
8 |
-
|
9 |
|
10 |
# Updated transcribe_and_predict_video function from your code
|
11 |
def transcribe_and_predict_video(video):
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
3 |
import tempfile
|
4 |
import numpy as np
|
5 |
|
6 |
# Initialize LLaMA Model for Question Answering
|
7 |
+
llama_model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1")
|
8 |
+
llama_tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1")
|
9 |
|
10 |
# Updated transcribe_and_predict_video function from your code
|
11 |
def transcribe_and_predict_video(video):
|