Shima111 commited on
Commit
2c71409
·
1 Parent(s): 48baad8
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,15 +9,15 @@ def greet(name):
9
 
10
 
11
 
12
- url = "https://us-central1-samaibackend.cloudfunctions.net/happyAI/pictures"
13
- payload = {"myPrompt": "cat"}
14
  headers = {"Content-Type": "application/json"}
15
 
16
  response = requests.post(url, data=json.dumps(payload), headers=headers)
17
  result = response.json()
18
  print(result)
19
 
20
- return "Hello " + name + "!!"
21
 
22
  iface = gr.Interface(fn=greet, inputs=["text"], outputs="text")
23
  iface.launch()
 
9
 
10
 
11
 
12
+ url = "http://127.0.0.1:5001/samaibackend/us-central1/test"
13
+ payload = {"ima": "cat"}
14
  headers = {"Content-Type": "application/json"}
15
 
16
  response = requests.post(url, data=json.dumps(payload), headers=headers)
17
  result = response.json()
18
  print(result)
19
 
20
+ return "Hello " + name + "!!" + result
21
 
22
  iface = gr.Interface(fn=greet, inputs=["text"], outputs="text")
23
  iface.launch()