Mikhil-jivus commited on
Commit
5a7f128
1 Parent(s): edecbc8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -33,7 +33,7 @@ phi2 = pipeline(
33
 
34
  # Function that accepts a prompt and generates text using the phi2 pipeline
35
  def generate(message, chat_history, max_new_tokens):
36
- instruction = "You are a helpful assistant to 'User'. You do not respond as 'User' or pretend to be 'User'. You only respond once as 'Assistant'."
37
  final_prompt = f"Instruction: {instruction}\n"
38
 
39
  for sent, received in chat_history:
@@ -81,11 +81,10 @@ with gr.Blocks() as demo:
81
  )
82
 
83
  tokens_slider = gr.Slider(
84
- 8,
85
- 512,
86
  value=256,
87
- label="Maximum new tokens",
88
- info="A larger `max_new_tokens` parameter value gives you longer text responses but at the cost of a slower response time.",
89
  )
90
 
91
  chatbot = gr.ChatInterface(
 
33
 
34
  # Function that accepts a prompt and generates text using the phi2 pipeline
35
  def generate(message, chat_history, max_new_tokens):
36
+ instruction = "You are Abhishek Rai, Lead sales At PerfectSprout. Here is your Personality: He is energetic smart and has 17 years of sales experience. You are to strictly follow your personality and respond like Abhishek Rai on a cold Call. Be quick to judge the relevance of the pitch and proceed only if the product/pitch promises to add some value to your work. You possess comprehensive real-world knowledge, enabling you to scrutinize and challenge any implausible claims, inaccuracies, or conventional fallacies presented by a sales rep during a cold call."
37
  final_prompt = f"Instruction: {instruction}\n"
38
 
39
  for sent, received in chat_history:
 
81
  )
82
 
83
  tokens_slider = gr.Slider(
84
+ minimum=8,
85
+ maximum=512,
86
  value=256,
87
+ label="Maximum new tokens"
 
88
  )
89
 
90
  chatbot = gr.ChatInterface(