Spaces:
Runtime error
Runtime error
print statements :(
Browse files
app.py
CHANGED
|
@@ -28,7 +28,6 @@ BASE_URL = "https://api.openai.com"
|
|
| 28 |
print(f"BASE_URL: {BASE_URL}")
|
| 29 |
print(f"API_KEY: {API_KEY}")
|
| 30 |
|
| 31 |
-
exit()
|
| 32 |
if not BASE_URL or not API_KEY:
|
| 33 |
raise ValueError("BASE_URL or API_KEY environment variables are not set")
|
| 34 |
|
|
@@ -107,7 +106,7 @@ def create_interface(users):
|
|
| 107 |
# plot_time_limit = 10
|
| 108 |
dialogue_time_limit = 600
|
| 109 |
# dialogue_time_limit = 10
|
| 110 |
-
|
| 111 |
with gr.Blocks() as demo:
|
| 112 |
user_state = gr.State()
|
| 113 |
notes_state = gr.State([])
|
|
@@ -542,7 +541,7 @@ def create_interface(users):
|
|
| 542 |
demographic_survey_responses],
|
| 543 |
outputs=[file_to_download]
|
| 544 |
)
|
| 545 |
-
|
| 546 |
demo.load(
|
| 547 |
lambda: gr.update(visible=True), # Show login page
|
| 548 |
outputs=login_row,
|
|
@@ -567,11 +566,12 @@ def create_interface(users):
|
|
| 567 |
|
| 568 |
# demo.launch()
|
| 569 |
|
| 570 |
-
users = Path("users.txt").read_text().splitlines()
|
| 571 |
-
users = set(user.strip() for user in users if user.strip())
|
| 572 |
# chosen_image = pick_random_image()
|
| 573 |
# reference_code = chosen_image.replace(".png", ".py")
|
| 574 |
# code_context = extract_code_context(reference_code)
|
|
|
|
| 575 |
demo = create_interface(users)
|
| 576 |
|
| 577 |
demo.launch(share=False, server_port = 8000)
|
|
|
|
| 28 |
print(f"BASE_URL: {BASE_URL}")
|
| 29 |
print(f"API_KEY: {API_KEY}")
|
| 30 |
|
|
|
|
| 31 |
if not BASE_URL or not API_KEY:
|
| 32 |
raise ValueError("BASE_URL or API_KEY environment variables are not set")
|
| 33 |
|
|
|
|
| 106 |
# plot_time_limit = 10
|
| 107 |
dialogue_time_limit = 600
|
| 108 |
# dialogue_time_limit = 10
|
| 109 |
+
print("Init blocks")
|
| 110 |
with gr.Blocks() as demo:
|
| 111 |
user_state = gr.State()
|
| 112 |
notes_state = gr.State([])
|
|
|
|
| 541 |
demographic_survey_responses],
|
| 542 |
outputs=[file_to_download]
|
| 543 |
)
|
| 544 |
+
print("Before Load")
|
| 545 |
demo.load(
|
| 546 |
lambda: gr.update(visible=True), # Show login page
|
| 547 |
outputs=login_row,
|
|
|
|
| 566 |
|
| 567 |
# demo.launch()
|
| 568 |
|
| 569 |
+
#users = Path("users.txt").read_text().splitlines()
|
| 570 |
+
#users = set(user.strip() for user in users if user.strip())
|
| 571 |
# chosen_image = pick_random_image()
|
| 572 |
# reference_code = chosen_image.replace(".png", ".py")
|
| 573 |
# code_context = extract_code_context(reference_code)
|
| 574 |
+
print("BEFORE CREATE")
|
| 575 |
demo = create_interface(users)
|
| 576 |
|
| 577 |
demo.launch(share=False, server_port = 8000)
|