robinroy03 commited on
Commit
3ddc84f
1 Parent(s): e5e8307

fixed bugs, first production version -- 0.0

Browse files
Files changed (1) hide show
  1. main.py +4 -5
main.py CHANGED
@@ -15,11 +15,10 @@ def embedding():
15
  text: <text>
16
  }
17
  """
18
-
19
  message = request.get_json()
20
- message = model.encode(message)
21
-
22
- return {"output":model.encode(message['text'].tolist())}
23
 
 
24
 
25
- # curl -v -X POST 'http://127.0.0.1:8000/completion' --header 'Content-Type: application/json' --data '{"text": "what is an apple?"}'
 
15
  text: <text>
16
  }
17
  """
18
+
19
  message = request.get_json()
20
+ message = model.encode(message['text'])
 
 
21
 
22
+ return {"output": message.tolist()}
23
 
24
+ # curl -v -X POST 'http://127.0.0.1:8000/embedding' --header 'Content-Type: application/json' --data '{"text": "what is an apple?"}'