Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -101,11 +101,11 @@ def call_search(purpose, task, history, action_input):
|
|
| 101 |
history = "observation: the search results are:\n {}\n".format(return_list)
|
| 102 |
return "MAIN", None, history, task
|
| 103 |
else:
|
| 104 |
-
history = "observation: I need to trigger a search using the following syntax:\naction: SEARCH action_input=
|
| 105 |
return "UPDATE-TASK", None, history, task
|
| 106 |
except Exception as e:
|
| 107 |
print (e)
|
| 108 |
-
history = "observation: I need to trigger a search using the following syntax:\naction: SEARCH action_input=
|
| 109 |
return "UPDATE-TASK", None, history, task
|
| 110 |
|
| 111 |
#else:
|
|
@@ -303,7 +303,7 @@ def find_all(purpose,task,history, url):
|
|
| 303 |
print(soup.title.parent.name)
|
| 304 |
#rawp.append([tag.name for tag in soup.find_all()] )
|
| 305 |
print([tag.name for tag in soup.find_all()])
|
| 306 |
-
rawp=soup
|
| 307 |
c=0
|
| 308 |
rl = len(rawp)
|
| 309 |
print(rl)
|
|
@@ -320,11 +320,11 @@ def find_all(purpose,task,history, url):
|
|
| 320 |
task = "complete?"
|
| 321 |
return "MAIN", None, history, task
|
| 322 |
else:
|
| 323 |
-
history += "observation: I need to trigger a search using the following syntax:\naction: SCRAPE_WEBSITE action_input=
|
| 324 |
return "MAIN", None, history, task
|
| 325 |
except Exception as e:
|
| 326 |
print (e)
|
| 327 |
-
history += "observation: I need to trigger a search using the following syntax:\naction: SCRAPE_WEBSITE action_input=
|
| 328 |
return "MAIN", None, history, task
|
| 329 |
|
| 330 |
#else:
|
|
|
|
| 101 |
history = "observation: the search results are:\n {}\n".format(return_list)
|
| 102 |
return "MAIN", None, history, task
|
| 103 |
else:
|
| 104 |
+
history = "observation: I need to trigger a search using the following syntax:\naction: SEARCH action_input=URL\n"
|
| 105 |
return "UPDATE-TASK", None, history, task
|
| 106 |
except Exception as e:
|
| 107 |
print (e)
|
| 108 |
+
history = "observation: I need to trigger a search using the following syntax:\naction: SEARCH action_input=URL\n"
|
| 109 |
return "UPDATE-TASK", None, history, task
|
| 110 |
|
| 111 |
#else:
|
|
|
|
| 303 |
print(soup.title.parent.name)
|
| 304 |
#rawp.append([tag.name for tag in soup.find_all()] )
|
| 305 |
print([tag.name for tag in soup.find_all()])
|
| 306 |
+
rawp=soup
|
| 307 |
c=0
|
| 308 |
rl = len(rawp)
|
| 309 |
print(rl)
|
|
|
|
| 320 |
task = "complete?"
|
| 321 |
return "MAIN", None, history, task
|
| 322 |
else:
|
| 323 |
+
history += "observation: I need to trigger a search using the following syntax:\naction: SCRAPE_WEBSITE action_input=URL\n"
|
| 324 |
return "MAIN", None, history, task
|
| 325 |
except Exception as e:
|
| 326 |
print (e)
|
| 327 |
+
history += "observation: I need to trigger a search using the following syntax:\naction: SCRAPE_WEBSITE action_input=URL\n"
|
| 328 |
return "MAIN", None, history, task
|
| 329 |
|
| 330 |
#else:
|