Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import gradio as gr
|
|
| 3 |
import requests
|
| 4 |
import pandas as pd
|
| 5 |
import base64
|
| 6 |
-
|
| 7 |
from dotenv import load_dotenv
|
| 8 |
from typing import TypedDict, Annotated
|
| 9 |
from langchain_core.messages import AnyMessage, SystemMessage, HumanMessage
|
|
@@ -20,7 +20,10 @@ from huggingface_hub import login, InferenceClient
|
|
| 20 |
# --- Constants ---
|
| 21 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 22 |
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
def get_file_path(task_id: str, question) -> str:
|
| 26 |
"""Retrieves reference file path."""
|
|
|
|
| 3 |
import requests
|
| 4 |
import pandas as pd
|
| 5 |
import base64
|
| 6 |
+
import ollama
|
| 7 |
from dotenv import load_dotenv
|
| 8 |
from typing import TypedDict, Annotated
|
| 9 |
from langchain_core.messages import AnyMessage, SystemMessage, HumanMessage
|
|
|
|
| 20 |
# --- Constants ---
|
| 21 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 22 |
|
| 23 |
+
print("Loading LLM...")
|
| 24 |
+
ollama.pull('gemma3:4b')
|
| 25 |
+
|
| 26 |
+
model_id = "google/gemma-3-4b-it"
|
| 27 |
|
| 28 |
def get_file_path(task_id: str, question) -> str:
|
| 29 |
"""Retrieves reference file path."""
|