Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,41 @@
|
|
| 1 |
-
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
--- Global Variables for App State ---
|
| 4 |
app_state = {"components": []} terminal_history = ""
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import subprocess
|
| 3 |
+
import random
|
| 4 |
+
import json
|
| 5 |
+
from datetime import datetime
|
| 6 |
+
|
| 7 |
+
from huggingface_hub import (
|
| 8 |
+
InferenceClient,
|
| 9 |
+
cached_download,
|
| 10 |
+
hf_hub_url
|
| 11 |
+
)
|
| 12 |
+
import gradio as gr
|
| 13 |
+
|
| 14 |
+
from safe_search import safe_search
|
| 15 |
+
from i_search import google
|
| 16 |
+
from i_search import i_search as i_s
|
| 17 |
+
|
| 18 |
+
from agent import (
|
| 19 |
+
ACTION_PROMPT,
|
| 20 |
+
ADD_PROMPT,
|
| 21 |
+
COMPRESS_HISTORY_PROMPT,
|
| 22 |
+
LOG_PROMPT,
|
| 23 |
+
LOG_RESPONSE,
|
| 24 |
+
MODIFY_PROMPT,
|
| 25 |
+
PREFIX,
|
| 26 |
+
SEARCH_QUERY,
|
| 27 |
+
READ_PROMPT,
|
| 28 |
+
TASK_PROMPT,
|
| 29 |
+
UNDERSTAND_TEST_RESULTS_PROMPT,
|
| 30 |
+
)
|
| 31 |
+
|
| 32 |
+
from utils import (
|
| 33 |
+
parse_action,
|
| 34 |
+
parse_file_content,
|
| 35 |
+
read_python_module_structure
|
| 36 |
+
)
|
| 37 |
+
from datetime import datetime
|
| 38 |
+
import json
|
| 39 |
|
| 40 |
--- Global Variables for App State ---
|
| 41 |
app_state = {"components": []} terminal_history = ""
|