Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -98,9 +98,9 @@ def create_vector_store(transcript):
|
|
| 98 |
# -------------------------------------------------
|
| 99 |
def build_model(model_choice, temperature=0.7):
|
| 100 |
"""Return the correct model and a flag indicating if it’s chat-based."""
|
| 101 |
-
if model_choice == "
|
| 102 |
llm = HuggingFaceEndpoint(
|
| 103 |
-
repo_id="
|
| 104 |
huggingfacehub_api_token=api_key,
|
| 105 |
task="text-generation",
|
| 106 |
max_new_tokens=500,
|
|
@@ -162,7 +162,7 @@ st.title("🎬 YouTube Transcript Chatbot (RAG)")
|
|
| 162 |
|
| 163 |
video_id = st.text_input("YouTube Video ID", value="lv1_-RER4_I")
|
| 164 |
query = st.text_area("Your Query", value="What is RAG?")
|
| 165 |
-
model_choice = st.radio("Model to Use", ["
|
| 166 |
temperature = st.slider("Temperature", 0, 100, value=50) / 100.0
|
| 167 |
|
| 168 |
# Get available languages for this video
|
|
|
|
| 98 |
# -------------------------------------------------
|
| 99 |
def build_model(model_choice, temperature=0.7):
|
| 100 |
"""Return the correct model and a flag indicating if it’s chat-based."""
|
| 101 |
+
if model_choice == "Llama-3.2-1B":
|
| 102 |
llm = HuggingFaceEndpoint(
|
| 103 |
+
repo_id="meta-llama/Llama-3.2-1B-Instruct",
|
| 104 |
huggingfacehub_api_token=api_key,
|
| 105 |
task="text-generation",
|
| 106 |
max_new_tokens=500,
|
|
|
|
| 162 |
|
| 163 |
video_id = st.text_input("YouTube Video ID", value="lv1_-RER4_I")
|
| 164 |
query = st.text_area("Your Query", value="What is RAG?")
|
| 165 |
+
model_choice = st.radio("Model to Use", ["Llama-3.2-1B", "Gemma-2-3B", "DeepSeek-685B", "OpenAI-20B"])
|
| 166 |
temperature = st.slider("Temperature", 0, 100, value=50) / 100.0
|
| 167 |
|
| 168 |
# Get available languages for this video
|