Jose Alberto Arango Sanchez
commited on
Commit
·
3c8a5ec
1
Parent(s):
3c358cb
first step
Browse files
app.py
CHANGED
@@ -26,13 +26,15 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
26 |
"""
|
27 |
# --- Determine HF Space Runtime URL and Repo URL ---
|
28 |
space_id = os.getenv("SPACE_ID") # Get the SPACE_ID for sending link to the code
|
|
|
29 |
|
30 |
if profile:
|
31 |
username= f"{profile.username}"
|
32 |
print(f"User logged in: {username}")
|
33 |
else:
|
34 |
print("User not logged in.")
|
35 |
-
|
|
|
36 |
|
37 |
api_url = DEFAULT_API_URL
|
38 |
questions_url = f"{api_url}/questions"
|
@@ -160,6 +162,7 @@ with gr.Blocks() as demo:
|
|
160 |
|
161 |
gr.LoginButton()
|
162 |
|
|
|
163 |
run_button = gr.Button("Run Evaluation & Submit All Answers.")
|
164 |
|
165 |
status_output = gr.Textbox(label="Run Status / Submission Result", lines=5, interactive=False)
|
|
|
26 |
"""
|
27 |
# --- Determine HF Space Runtime URL and Repo URL ---
|
28 |
space_id = os.getenv("SPACE_ID") # Get the SPACE_ID for sending link to the code
|
29 |
+
jose_env= os.getenv("JOSE_ENV") # Get the JOSE_ENV for sending link to the code
|
30 |
|
31 |
if profile:
|
32 |
username= f"{profile.username}"
|
33 |
print(f"User logged in: {username}")
|
34 |
else:
|
35 |
print("User not logged in.")
|
36 |
+
|
37 |
+
return f'Please Login to Hugging Face with the button. ***{jose_env}', None
|
38 |
|
39 |
api_url = DEFAULT_API_URL
|
40 |
questions_url = f"{api_url}/questions"
|
|
|
162 |
|
163 |
gr.LoginButton()
|
164 |
|
165 |
+
|
166 |
run_button = gr.Button("Run Evaluation & Submit All Answers.")
|
167 |
|
168 |
status_output = gr.Textbox(label="Run Status / Submission Result", lines=5, interactive=False)
|