Spaces:
Sleeping
Sleeping
record result update
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ import os
|
|
8 |
import re
|
9 |
os.environ["TOKENIZERS_PARALLELISM"] = "false"
|
10 |
|
11 |
-
openai_api_key =
|
12 |
|
13 |
task_completed = 0
|
14 |
task_completed_steps = None
|
@@ -48,8 +48,8 @@ class AppSimulator:
|
|
48 |
human_result_url = "jjz5463/simulator_human_result"
|
49 |
synthetic_tasks = load_dataset(human_result_url, app_name, split='train')
|
50 |
|
51 |
-
incomplete_tasks = synthetic_tasks.filter(is_task_incomplete)
|
52 |
-
give_up_tasks = synthetic_tasks.filter(is_task_given_up)
|
53 |
if len(incomplete_tasks) > 0:
|
54 |
incomplete_task = incomplete_tasks[0]
|
55 |
task = incomplete_task["tasks"]
|
@@ -110,7 +110,7 @@ def chat(user_input, history):
|
|
110 |
human_result_url = "jjz5463/simulator_human_result"
|
111 |
app_name = simulator_app.app_name
|
112 |
synthetic_tasks = load_dataset(human_result_url, app_name, split='train')
|
113 |
-
incomplete_tasks = synthetic_tasks.filter(is_task_incomplete)
|
114 |
if len(incomplete_tasks) > 0:
|
115 |
incomplete_task_index = incomplete_tasks['__index_level_0__'][0]
|
116 |
synthetic_tasks = synthetic_tasks.map(
|
@@ -142,7 +142,7 @@ def give_up():
|
|
142 |
synthetic_tasks = load_dataset(human_result_url, app_name, split='train')
|
143 |
|
144 |
# Find the first incomplete task
|
145 |
-
incomplete_tasks = synthetic_tasks.filter(is_task_incomplete)
|
146 |
if len(incomplete_tasks) > 0:
|
147 |
incomplete_task_index = incomplete_tasks['__index_level_0__'][0]
|
148 |
|
|
|
8 |
import re
|
9 |
os.environ["TOKENIZERS_PARALLELISM"] = "false"
|
10 |
|
11 |
+
openai_api_key = os.getenv("OPENAI_API_KEY")
|
12 |
|
13 |
task_completed = 0
|
14 |
task_completed_steps = None
|
|
|
48 |
human_result_url = "jjz5463/simulator_human_result"
|
49 |
synthetic_tasks = load_dataset(human_result_url, app_name, split='train')
|
50 |
|
51 |
+
incomplete_tasks = synthetic_tasks.filter(is_task_incomplete, with_indices=True,)
|
52 |
+
give_up_tasks = synthetic_tasks.filter(is_task_given_up, with_indices=True,)
|
53 |
if len(incomplete_tasks) > 0:
|
54 |
incomplete_task = incomplete_tasks[0]
|
55 |
task = incomplete_task["tasks"]
|
|
|
110 |
human_result_url = "jjz5463/simulator_human_result"
|
111 |
app_name = simulator_app.app_name
|
112 |
synthetic_tasks = load_dataset(human_result_url, app_name, split='train')
|
113 |
+
incomplete_tasks = synthetic_tasks.filter(is_task_incomplete, with_indices=True,)
|
114 |
if len(incomplete_tasks) > 0:
|
115 |
incomplete_task_index = incomplete_tasks['__index_level_0__'][0]
|
116 |
synthetic_tasks = synthetic_tasks.map(
|
|
|
142 |
synthetic_tasks = load_dataset(human_result_url, app_name, split='train')
|
143 |
|
144 |
# Find the first incomplete task
|
145 |
+
incomplete_tasks = synthetic_tasks.filter(is_task_incomplete, with_indices=True,)
|
146 |
if len(incomplete_tasks) > 0:
|
147 |
incomplete_task_index = incomplete_tasks['__index_level_0__'][0]
|
148 |
|