eswardivi commited on
Commit
3c2563a
1 Parent(s): 741f665

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -68,6 +68,8 @@ def chat(message, history, temperature,do_sample, max_tokens):
68
  max_new_tokens=max_tokens,
69
  do_sample=True,
70
  temperature=temperature,
 
 
71
  eos_token_id=terminators,
72
  )
73
 
@@ -95,14 +97,14 @@ def chat(message, history, temperature,do_sample, max_tokens):
95
 
96
  demo = gr.ChatInterface(
97
  fn=chat,
98
- examples=[["Write me a poem about Machine Learning."]],
99
  # multimodal=False,
100
  additional_inputs_accordion=gr.Accordion(
101
  label="⚙️ Parameters", open=False, render=False
102
  ),
103
  additional_inputs=[
104
  gr.Slider(
105
- minimum=0, maximum=1, step=0.1, value=0.9, label="Temperature", render=False
106
  ),
107
  gr.Checkbox(label="Sampling",value=True),
108
  gr.Slider(
 
68
  max_new_tokens=max_tokens,
69
  do_sample=True,
70
  temperature=temperature,
71
+ repetition_penalty=1.2,
72
+ use_cache=False
73
  eos_token_id=terminators,
74
  )
75
 
 
97
 
98
  demo = gr.ChatInterface(
99
  fn=chat,
100
+ examples=[["I'm a farmer from Odisha, how do I take care of whitefly in my cotton crop?"]],
101
  # multimodal=False,
102
  additional_inputs_accordion=gr.Accordion(
103
  label="⚙️ Parameters", open=False, render=False
104
  ),
105
  additional_inputs=[
106
  gr.Slider(
107
+ minimum=0, maximum=1, step=0.1, value=0.5, label="Temperature", render=False
108
  ),
109
  gr.Checkbox(label="Sampling",value=True),
110
  gr.Slider(