Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -50,15 +50,16 @@ qa_faq = StructuredTool.from_function(
|
|
50 |
analyze_data = StructuredTool.from_function(
|
51 |
func=get_data,
|
52 |
description = """
|
53 |
-
Analyze and summarize data from a given url asked by the user to summarize or analyze dont use it with the tool request_data and the user must write analyze before this function get executed
|
54 |
Parameters :
|
55 |
- url (string) : the url given by the user.
|
56 |
Returns :
|
57 |
-
- string :
|
58 |
Example:
|
59 |
>>> analyse this data of this link : https://data.gov.ma/data/fr/dataset/evolution-des-affaires-au-cours-du-quinquennat-2018-2022
|
60 |
>>> input : https://data.gov.ma/data/fr/dataset/evolution-des-affaires-au-cours-du-quinquennat-2018-2022
|
61 |
""",
|
|
|
62 |
)
|
63 |
|
64 |
def request_data(query: str) -> str:
|
|
|
50 |
analyze_data = StructuredTool.from_function(
|
51 |
func=get_data,
|
52 |
description = """
|
53 |
+
Analyze and summarize data from a given url asked by the user to summarize or analyze dont use it with the tool request_data and the user must write analyze before this function get executed.
|
54 |
Parameters :
|
55 |
- url (string) : the url given by the user.
|
56 |
Returns :
|
57 |
+
- string : Once the data is outputed from the function it get summarized and returned to the user and it must be in french.
|
58 |
Example:
|
59 |
>>> analyse this data of this link : https://data.gov.ma/data/fr/dataset/evolution-des-affaires-au-cours-du-quinquennat-2018-2022
|
60 |
>>> input : https://data.gov.ma/data/fr/dataset/evolution-des-affaires-au-cours-du-quinquennat-2018-2022
|
61 |
""",
|
62 |
+
return_direct = True,
|
63 |
)
|
64 |
|
65 |
def request_data(query: str) -> str:
|