Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
|
|
3 |
import requests
|
4 |
import inspect
|
5 |
import pandas as pd
|
6 |
-
from
|
7 |
import chess
|
8 |
import chess.engine
|
9 |
from PIL import Image
|
@@ -20,11 +20,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
20 |
class BasicAgent:
|
21 |
def __init__(self):
|
22 |
print("BasicAgent initialized.")
|
23 |
-
self.
|
24 |
-
model=HfApiModel(
|
25 |
-
model_name="mistralai/Mistral-7B-Instruct-v0.1" , # Or another accessible model
|
26 |
-
api_key=os.getenv("HF_TOKEN")
|
27 |
-
))
|
28 |
|
29 |
SYSTEM_PROMPT = """You are a general AI assistant. I will ask you a question. Report your thoughts, and
|
30 |
finish your answer with the following template: FINAL ANSWER: [YOUR FINAL ANSWER].
|
|
|
3 |
import requests
|
4 |
import inspect
|
5 |
import pandas as pd
|
6 |
+
from huggingface_hub import InferenceClient
|
7 |
import chess
|
8 |
import chess.engine
|
9 |
from PIL import Image
|
|
|
20 |
class BasicAgent:
|
21 |
def __init__(self):
|
22 |
print("BasicAgent initialized.")
|
23 |
+
self.model = InferenceClient("mistralai/Mistral-7B-Instruct-v0.1") # Using the correct model name here
|
|
|
|
|
|
|
|
|
24 |
|
25 |
SYSTEM_PROMPT = """You are a general AI assistant. I will ask you a question. Report your thoughts, and
|
26 |
finish your answer with the following template: FINAL ANSWER: [YOUR FINAL ANSWER].
|