Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,7 @@ import gradio as gr
|
|
| 3 |
import requests
|
| 4 |
import pandas as pd
|
| 5 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
|
| 6 |
|
| 7 |
# ---------- Imports for Advanced Agent ----------
|
| 8 |
import re
|
|
@@ -174,6 +175,7 @@ class BasicAgent:
|
|
| 174 |
# --- Evaluation Logic ---
|
| 175 |
def run_and_submit_all(profile: gr.OAuthProfile | None):
|
| 176 |
space_id = os.getenv("SPACE_ID")
|
|
|
|
| 177 |
if profile:
|
| 178 |
username = profile.username
|
| 179 |
print(f"User logged in: {username}")
|
|
|
|
| 3 |
import requests
|
| 4 |
import pandas as pd
|
| 5 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 6 |
+
from gradio import get_oauth_profile
|
| 7 |
|
| 8 |
# ---------- Imports for Advanced Agent ----------
|
| 9 |
import re
|
|
|
|
| 175 |
# --- Evaluation Logic ---
|
| 176 |
def run_and_submit_all(profile: gr.OAuthProfile | None):
|
| 177 |
space_id = os.getenv("SPACE_ID")
|
| 178 |
+
profile = get_oauth_profile()
|
| 179 |
if profile:
|
| 180 |
username = profile.username
|
| 181 |
print(f"User logged in: {username}")
|