KingNish commited on
Commit
2db11b9
·
verified ·
1 Parent(s): c68088d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -1
app.py CHANGED
@@ -47,7 +47,6 @@ def models(text, model="Mixtral 8x7B", seed=42):
47
  client = client_fn(model)
48
 
49
  generate_kwargs = dict(
50
- top_p=0.95,
51
  max_new_tokens=300,
52
  seed=seed
53
  )
@@ -107,5 +106,35 @@ with gr.Blocks(css="style.css") as demo:
107
  inputs=[input, select, seed],
108
  outputs=[output], live=True)
109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  if __name__ == "__main__":
111
  demo.queue(max_size=200).launch()
 
47
  client = client_fn(model)
48
 
49
  generate_kwargs = dict(
 
50
  max_new_tokens=300,
51
  seed=seed
52
  )
 
106
  inputs=[input, select, seed],
107
  outputs=[output], live=True)
108
 
109
+ gr.Markdown(DESCRIPTION)
110
+ with gr.Row():
111
+ select = gr.Dropdown([ 'Mixtral 8x7B',
112
+ 'Llama 3 8B',
113
+ 'Mistral 7B v0.3',
114
+ 'Phi 3 mini',
115
+ ],
116
+ value="Mistral 7B v0.3",
117
+ label="Model"
118
+ )
119
+ seed = gr.Slider(
120
+ label="Seed",
121
+ minimum=0,
122
+ maximum=999999,
123
+ step=1,
124
+ value=0,
125
+ visible=False
126
+ )
127
+ input = gr.Textbox(label="User", sources="microphone", type="filepath", waveform_options=False)
128
+ output = gr.Textbox(label="AI", type="filepath",
129
+ interactive=False,
130
+ autoplay=True,
131
+ elem_classes="audio")
132
+ gr.Interface(
133
+ batch=True,
134
+ max_batch_size=10,
135
+ fn=models,
136
+ inputs=[input, select, seed],
137
+ outputs=[output], live=True)
138
+
139
  if __name__ == "__main__":
140
  demo.queue(max_size=200).launch()