steef68 commited on
Commit
ec00004
·
verified ·
1 Parent(s): 0dd69f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -2,7 +2,7 @@ from huggingface_hub import InferenceClient
2
  import gradio as gr
3
 
4
  client = InferenceClient(
5
- "mistralai/Mixtral-8x7B-Instruct-v0.1"
6
  )
7
 
8
 
@@ -59,7 +59,7 @@ additional_inputs=[
59
  gr.Slider(
60
  label="Max new tokens",
61
  value=2048,
62
- minimum=0,
63
  maximum=2048,
64
  step=64,
65
  interactive=True,
@@ -68,17 +68,17 @@ additional_inputs=[
68
  gr.Slider(
69
  label="Top-p (nucleus sampling)",
70
  value=0.90,
71
- minimum=0.0,
72
- maximum=1,
73
  step=0.05,
74
  interactive=True,
75
  info="Higher values sample more low-probability tokens",
76
  ),
77
  gr.Slider(
78
  label="Repetition penalty",
79
- value=1.2,
80
- minimum=1.0,
81
- maximum=2.0,
82
  step=0.05,
83
  interactive=True,
84
  info="Penalize repeated tokens",
@@ -87,8 +87,8 @@ additional_inputs=[
87
 
88
  gr.ChatInterface(
89
  fn=generate,
90
- chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel"),
91
  additional_inputs=additional_inputs,
92
- title="Mixtral 8X7B",
93
  concurrency_limit=10,
94
  ).launch(show_api=False)
 
2
  import gradio as gr
3
 
4
  client = InferenceClient(
5
+ "mistralai/Mixtral-8x7B-Instruct-v0.2"
6
  )
7
 
8
 
 
59
  gr.Slider(
60
  label="Max new tokens",
61
  value=2048,
62
+ minimum=256,
63
  maximum=2048,
64
  step=64,
65
  interactive=True,
 
68
  gr.Slider(
69
  label="Top-p (nucleus sampling)",
70
  value=0.90,
71
+ minimum=0.1,
72
+ maximum=0.95,
73
  step=0.05,
74
  interactive=True,
75
  info="Higher values sample more low-probability tokens",
76
  ),
77
  gr.Slider(
78
  label="Repetition penalty",
79
+ value=1.1,
80
+ minimum=1.1,
81
+ maximum=1.9,
82
  step=0.05,
83
  interactive=True,
84
  info="Penalize repeated tokens",
 
87
 
88
  gr.ChatInterface(
89
  fn=generate,
90
+ chatbot=gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, layout="panel"),
91
  additional_inputs=additional_inputs,
92
+ title="Mixtral 8X7B-v0.2",
93
  concurrency_limit=10,
94
  ).launch(show_api=False)