muryshev commited on
Commit
a5c1fd4
1 Parent(s): ab51332

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -28,9 +28,9 @@ def generate(
28
  seed=42,
29
  )
30
 
31
- formatted_prompt = format_prompt(prompt, history)
32
 
33
- stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
34
  output = ""
35
 
36
  for response in stream:
@@ -46,8 +46,8 @@ def health():
46
  def search_route():
47
  data = request.get_json()
48
  prompt = data.get('prompt', '')
49
- truncated_prompt = prompt[:32768]
50
- return Response(generate(truncated_prompt), content_type='text/plain', status=200, direct_passthrough=True)
51
 
52
  if __name__ == '__main__':
53
  app.run(debug=False, host='0.0.0.0', port=7860)
 
28
  seed=42,
29
  )
30
 
31
+ #formatted_prompt = format_prompt(prompt, history)
32
 
33
+ stream = client.text_generation(prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
34
  output = ""
35
 
36
  for response in stream:
 
46
  def search_route():
47
  data = request.get_json()
48
  prompt = data.get('prompt', '')
49
+ #truncated_prompt = prompt[:32768]
50
+ return Response(generate(prompt), content_type='text/plain', status=200, direct_passthrough=True)
51
 
52
  if __name__ == '__main__':
53
  app.run(debug=False, host='0.0.0.0', port=7860)