Spaces:
Runtime error
Runtime error
Sasha Rush
commited on
Commit
·
2086271
1
Parent(s):
56b0a2e
save
Browse files
app.py
CHANGED
|
@@ -380,6 +380,10 @@ GPTWorld is a prompting game. Your goal is to get an LLM to complete a maze. You
|
|
| 380 |
choices=["Easy", "Medium", "Hard", "Evil"])
|
| 381 |
api_key = gr.Text(label="OpenAI Key", type="password",
|
| 382 |
value=os.environ.get("OPENAI_API_KEY"))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 383 |
prompt = gr.Code(label="Prompt (This is for you to fill out)", language="python", lines=40, value=f"""
|
| 384 |
# A prompt to describe this game to the GPT model.
|
| 385 |
|
|
@@ -412,9 +416,6 @@ def move(board, action, old_pos):
|
|
| 412 |
|
| 413 |
# Finally use %GAME% to inject the game description above.
|
| 414 |
""")
|
| 415 |
-
with gr.Row():
|
| 416 |
-
start_btn = gr.Button("Prompt >")
|
| 417 |
-
cancel_btn = gr.Button("Cancel")
|
| 418 |
with gr.Column():
|
| 419 |
im = gr.Gallery(label="Gallery of the Game")
|
| 420 |
im.style(preview=True, object_fit="scale-down", columns=1, container=True)
|
|
|
|
| 380 |
choices=["Easy", "Medium", "Hard", "Evil"])
|
| 381 |
api_key = gr.Text(label="OpenAI Key", type="password",
|
| 382 |
value=os.environ.get("OPENAI_API_KEY"))
|
| 383 |
+
with gr.Row():
|
| 384 |
+
start_btn = gr.Button("Prompt >")
|
| 385 |
+
cancel_btn = gr.Button("Cancel")
|
| 386 |
+
|
| 387 |
prompt = gr.Code(label="Prompt (This is for you to fill out)", language="python", lines=40, value=f"""
|
| 388 |
# A prompt to describe this game to the GPT model.
|
| 389 |
|
|
|
|
| 416 |
|
| 417 |
# Finally use %GAME% to inject the game description above.
|
| 418 |
""")
|
|
|
|
|
|
|
|
|
|
| 419 |
with gr.Column():
|
| 420 |
im = gr.Gallery(label="Gallery of the Game")
|
| 421 |
im.style(preview=True, object_fit="scale-down", columns=1, container=True)
|