Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,7 +58,7 @@ def search_full_plant_information(plant_name:str):
|
|
| 58 |
for result in search_results:
|
| 59 |
content+=result['body']
|
| 60 |
content+=fetch_page_content(result['href'])
|
| 61 |
-
time.sleep(
|
| 62 |
prompt = PROMPT_TEMPLATE.format(plant_name=plant_name, content=content)
|
| 63 |
response = requests.get(f"{specialtoken}/{prompt}")
|
| 64 |
print (response.text)
|
|
@@ -132,7 +132,7 @@ def split_and_search(text:str):
|
|
| 132 |
plants=text.split(",")
|
| 133 |
for each in plants:
|
| 134 |
sp=search_full_plant_information(each.strip()).replace('```json','').replace('```','').split('**Sponsored**')[0]+"\n\n"
|
| 135 |
-
yield sp
|
| 136 |
all_data+=sp
|
| 137 |
time.sleep(1)
|
| 138 |
return all_data
|
|
|
|
| 58 |
for result in search_results:
|
| 59 |
content+=result['body']
|
| 60 |
content+=fetch_page_content(result['href'])
|
| 61 |
+
time.sleep(2)
|
| 62 |
prompt = PROMPT_TEMPLATE.format(plant_name=plant_name, content=content)
|
| 63 |
response = requests.get(f"{specialtoken}/{prompt}")
|
| 64 |
print (response.text)
|
|
|
|
| 132 |
plants=text.split(",")
|
| 133 |
for each in plants:
|
| 134 |
sp=search_full_plant_information(each.strip()).replace('```json','').replace('```','').split('**Sponsored**')[0]+"\n\n"
|
| 135 |
+
#yield sp
|
| 136 |
all_data+=sp
|
| 137 |
time.sleep(1)
|
| 138 |
return all_data
|