Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,7 @@ import requests
|
|
| 3 |
import os
|
| 4 |
import json
|
| 5 |
from bardapi import Bard
|
|
|
|
| 6 |
|
| 7 |
bardKey = os.environ.get('_BARD_API_KEY')
|
| 8 |
|
|
@@ -33,7 +34,13 @@ def bardChat(data):
|
|
| 33 |
|
| 34 |
|
| 35 |
def responsenew(data):
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
|
| 39 |
gradio_interface = gradio.Interface(
|
|
|
|
| 3 |
import os
|
| 4 |
import json
|
| 5 |
from bardapi import Bard
|
| 6 |
+
from executequery import ExecuteQuery
|
| 7 |
|
| 8 |
bardKey = os.environ.get('_BARD_API_KEY')
|
| 9 |
|
|
|
|
| 34 |
|
| 35 |
|
| 36 |
def responsenew(data):
|
| 37 |
+
|
| 38 |
+
result = ExecuteQuery(data)
|
| 39 |
+
|
| 40 |
+
if result[1] = "name" or "creator"
|
| 41 |
+
return result[0]
|
| 42 |
+
else:
|
| 43 |
+
return bardChat(data)
|
| 44 |
|
| 45 |
|
| 46 |
gradio_interface = gradio.Interface(
|