AkashDataScience commited on
Commit
44ec203
·
1 Parent(s): 459cf0f

Adding examples

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -37,6 +37,11 @@ def infer(message, history):
37
  outputs = pipe(prompt, max_new_tokens=256, do_sample=True, num_beams=1, temperature=0.3, top_k=50, top_p=0.95, max_time= 180)
38
  return outputs[0]['generated_text'][len(prompt):].strip()
39
 
 
 
 
 
40
  gr.ChatInterface(infer, chatbot=gr.Chatbot(height=300),
41
- textbox=gr.Textbox(placeholder="How can I help you today", container=False,
42
- scale=7), theme="soft", title="Phi-3 Assistant").launch()
 
 
37
  outputs = pipe(prompt, max_new_tokens=256, do_sample=True, num_beams=1, temperature=0.3, top_k=50, top_p=0.95, max_time= 180)
38
  return outputs[0]['generated_text'][len(prompt):].strip()
39
 
40
+ examples=["I am planning to buy a dog and a cat. Suggest some breeds that get along with each other",
41
+ "Explain biased coin flip",
42
+ "I want to buy a house. Suggest some factors to consider while making final decision"],
43
+
44
  gr.ChatInterface(infer, chatbot=gr.Chatbot(height=300),
45
+ textbox=gr.Textbox(placeholder="How can I help you today", container=False,
46
+ scale=7), theme="soft", examples=examples,
47
+ title="Phi-3 Assistant").launch()