Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,16 @@
|
|
1 |
import gradio as gr
|
2 |
-
from agent import
|
3 |
from api_utils import fetch_questions, submit_answers
|
|
|
4 |
|
5 |
API_URL = "https://.../questions"
|
6 |
SUBMIT_URL = "https://.../submit"
|
7 |
|
|
|
|
|
|
|
8 |
def run_evaluation(username):
|
9 |
-
agent =
|
10 |
questions = fetch_questions(API_URL)
|
11 |
|
12 |
answers = []
|
|
|
1 |
import gradio as gr
|
2 |
+
from agent import MistralAgent
|
3 |
from api_utils import fetch_questions, submit_answers
|
4 |
+
import os
|
5 |
|
6 |
API_URL = "https://.../questions"
|
7 |
SUBMIT_URL = "https://.../submit"
|
8 |
|
9 |
+
# Read your Hugging Face token from environment (safer)
|
10 |
+
HF_TOKEN = os.environ.get("HF_TOKEN")
|
11 |
+
|
12 |
def run_evaluation(username):
|
13 |
+
agent = MistralAgent(hf_token=HF_TOKEN)
|
14 |
questions = fetch_questions(API_URL)
|
15 |
|
16 |
answers = []
|