Spaces:
Running
Running
Update app.py
Browse filesSmall adjustments to get the warriors question working
app.py
CHANGED
@@ -38,7 +38,7 @@ def webpage_contents_get(url:str, headers_in: dict = None)-> bytes: #it's import
|
|
38 |
return response.content
|
39 |
|
40 |
@tool
|
41 |
-
def webpage_header_get(url:str)->
|
42 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
43 |
"""A simple function to grab header of a webpage. Can be passed into webpage_contents_get if desired.
|
44 |
Args:
|
@@ -144,8 +144,8 @@ def summarize_and_answer_from_web(url: str, question:str) -> str:
|
|
144 |
answer = para
|
145 |
break
|
146 |
|
147 |
-
|
148 |
-
return answer
|
149 |
|
150 |
|
151 |
final_answer = FinalAnswerTool()
|
|
|
38 |
return response.content
|
39 |
|
40 |
@tool
|
41 |
+
def webpage_header_get(url:str)-> dict: #it's import to specify the return type
|
42 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
43 |
"""A simple function to grab header of a webpage. Can be passed into webpage_contents_get if desired.
|
44 |
Args:
|
|
|
144 |
answer = para
|
145 |
break
|
146 |
|
147 |
+
return summary, answer
|
148 |
+
#return answer
|
149 |
|
150 |
|
151 |
final_answer = FinalAnswerTool()
|