rasyosef commited on
Commit
e86ab6d
1 Parent(s): 8974f60

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,7 +26,7 @@ def generate(prompt, chat_history):
26
  final_prompt += "User: " + prompt + "\n"
27
  final_prompt += "Output:"
28
 
29
- generated_text = phi2(final_prompt, max_new_tokens=24)[0]["generated_text"]
30
  response = generated_text.split("Output:")[1].split("User:")[0]
31
 
32
  if "Assistant:" in response:
@@ -41,7 +41,7 @@ with gr.Blocks() as demo:
41
  gr.Markdown("""
42
  # Phi-2 Chatbot Demo
43
 
44
- This chatbot was created using Microsoft's 2.7 billion parameter [phi-2](https://huggingface.co/microsoft/phi-2) Transformer model. In order to reduce the response time on this hardware, `max_new_tokens` has been set to `24` in the text generation pipeline. It takes up to 150 seconds for each response to be generated.
45
  """)
46
 
47
  chatbot = gr.Chatbot()
 
26
  final_prompt += "User: " + prompt + "\n"
27
  final_prompt += "Output:"
28
 
29
+ generated_text = phi2(final_prompt, max_new_tokens=42)[0]["generated_text"]
30
  response = generated_text.split("Output:")[1].split("User:")[0]
31
 
32
  if "Assistant:" in response:
 
41
  gr.Markdown("""
42
  # Phi-2 Chatbot Demo
43
 
44
+ This chatbot was created using Microsoft's 2.7 billion parameter [phi-2](https://huggingface.co/microsoft/phi-2) Transformer model. In order to reduce the response time on this hardware, `max_new_tokens` has been set to `42` in the text generation pipeline. It takes up to 150 seconds for each response to be generated.
45
  """)
46
 
47
  chatbot = gr.Chatbot()