Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -22,20 +22,14 @@ headers = {"Authorization": bearer }
|
|
22 |
app = Flask(__name__)
|
23 |
|
24 |
@app.route('/')
|
25 |
-
|
26 |
#res = await tool.run("Obama's first name?")
|
27 |
|
28 |
-
payload ={
|
29 |
-
"inputs": {
|
30 |
-
"source_sentence": "That is a happy person",
|
31 |
-
"sentences": [
|
32 |
-
"That is a happy dog",
|
33 |
-
"That is a very happy person",
|
34 |
-
"Today is a sunny day"]},}
|
35 |
|
36 |
print(payload)
|
37 |
#print(res)
|
38 |
-
response =
|
39 |
print(response)
|
40 |
return response.json()
|
41 |
|
|
|
22 |
app = Flask(__name__)
|
23 |
|
24 |
@app.route('/')
|
25 |
+
def command_app():
|
26 |
#res = await tool.run("Obama's first name?")
|
27 |
|
28 |
+
payload = {"inputs": {"source_sentence": "That is a happy person","sentences": ["That is a happy dog","That is a very happy person","Today is a sunny day"]},}
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
print(payload)
|
31 |
#print(res)
|
32 |
+
response = requests.post(API_URL, headers=headers, json=payload)
|
33 |
print(response)
|
34 |
return response.json()
|
35 |
|