Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -56,13 +56,13 @@ def responsenew(data):
|
|
56 |
newdata = data.replace("'", '"')
|
57 |
try:
|
58 |
items = json.loads(newdata)
|
59 |
-
|
60 |
-
|
61 |
-
print(
|
62 |
except json.JSONDecodeError as e:
|
63 |
print("Invalid JSON:", e)
|
64 |
-
response = model.generate_content(
|
65 |
-
print(f"\n{response.text}")
|
66 |
if text is not None:
|
67 |
if "remind me" in text:
|
68 |
values = getValues(text)
|
@@ -235,7 +235,7 @@ def responsenew(data):
|
|
235 |
}
|
236 |
else:
|
237 |
respo = {
|
238 |
-
"message": response.text,
|
239 |
"action": "nothing",
|
240 |
"function": "nothing",
|
241 |
}
|
|
|
56 |
newdata = data.replace("'", '"')
|
57 |
try:
|
58 |
items = json.loads(newdata)
|
59 |
+
query = items['text']
|
60 |
+
query = query.lower()
|
61 |
+
print(query)
|
62 |
except json.JSONDecodeError as e:
|
63 |
print("Invalid JSON:", e)
|
64 |
+
response = model.generate_content(query)
|
65 |
+
print(f"\n{to_markdown(response.text)}")
|
66 |
if text is not None:
|
67 |
if "remind me" in text:
|
68 |
values = getValues(text)
|
|
|
235 |
}
|
236 |
else:
|
237 |
respo = {
|
238 |
+
"message": to_markdown(response.text),
|
239 |
"action": "nothing",
|
240 |
"function": "nothing",
|
241 |
}
|