aibmedia commited on
Commit
eb194f1
·
verified ·
1 Parent(s): ada8eae

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -45,10 +45,10 @@ def server_one():
45
 
46
  @app.route('/findsimilarity')
47
  def server_1():
48
- 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" ] }, }
49
- response = requests.post(API_URL, headers=headers, json=payload)
50
  time.sleep(3)
51
- return response.json()
52
 
53
  # response = os.system(" curl https://api-inference.huggingface.co/models/sentence-transformers/all-MiniLM-L6-v2 -X POST -d '{ "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" , ] } , } ' -H 'Content-Type: application/json' -H 'Authorization: `+bearer+`' " )
54
 
 
45
 
46
  @app.route('/findsimilarity')
47
  def server_1():
48
+ 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" ] } , }
49
+ response = requests.post(API_URL, headers=headers, json=payload)
50
  time.sleep(3)
51
+ return response.json()
52
 
53
  # response = os.system(" curl https://api-inference.huggingface.co/models/sentence-transformers/all-MiniLM-L6-v2 -X POST -d '{ "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" , ] } , } ' -H 'Content-Type: application/json' -H 'Authorization: `+bearer+`' " )
54