aibmedia commited on
Commit
2e1bd45
·
verified ·
1 Parent(s): dc13f3c

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +8 -5
main.py CHANGED
@@ -22,8 +22,8 @@ headers = {"Authorization": bearer }
22
  app = Flask(__name__)
23
 
24
  @app.route('/')
25
- def command_app():
26
- res = tool.run("Obama's first name?")
27
 
28
  payload ={
29
  "inputs": {
@@ -32,9 +32,12 @@ def command_app():
32
  "That is a happy dog",
33
  "That is a very happy person",
34
  "Today is a sunny day"]},}
35
-
36
- response = requests.post(API_URL, headers=headers, json=payload)
37
- return response.json() + res
 
 
 
38
 
39
  @app.route('/app')
40
  def command_server():
 
22
  app = Flask(__name__)
23
 
24
  @app.route('/')
25
+ async def command_app():
26
+ res = await tool.run("Obama's first name?")
27
 
28
  payload ={
29
  "inputs": {
 
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 = await requests.post(API_URL, headers=headers, json=payload)
39
+ print(response)
40
+ return response.json()
41
 
42
  @app.route('/app')
43
  def command_server():