zenafey commited on
Commit
35c7bed
·
1 Parent(s): d208822

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -30,13 +30,13 @@ app = Flask(__name__)
30
  def index():
31
  return f'Hi, its a node {settings["node"]["id"]} with {settings["node"]["models"]}'
32
 
33
- @app.route('send', methods=['POST'])
34
  def send():
35
  message = request.json.get('message', 'hello!')
36
 
37
  client = Client("https://ysharma-explore-llamav2-with-tgi.hf.space/")
38
- result = client.predict(message, api_name="/chat")
39
- return {'response': result}
40
 
41
  @app.route("/chat/completions", methods=['POST'])
42
  def chat_completions():
 
30
  def index():
31
  return f'Hi, its a node {settings["node"]["id"]} with {settings["node"]["models"]}'
32
 
33
+ @app.route('/send', methods=['POST'])
34
  def send():
35
  message = request.json.get('message', 'hello!')
36
 
37
  client = Client("https://ysharma-explore-llamav2-with-tgi.hf.space/")
38
+ result = client.predict(message, api_name="/chat")
39
+ return {'response': result}
40
 
41
  @app.route("/chat/completions", methods=['POST'])
42
  def chat_completions():