meg HF staff commited on
Commit
7b816d7
·
verified ·
1 Parent(s): fdefe3c

Adding default values.

Browse files
Files changed (1) hide show
  1. app.py +48 -48
app.py CHANGED
@@ -180,55 +180,55 @@ def add_new_eval(
180
 
181
 
182
  with gr.Blocks() as demo:
183
- gr.Markdown("This is a super basic example 'frontend'. Fill out below then click **Run** to create the request file and launch the job.")
184
- gr.Markdown("The request file will be written so %s." % REQUESTS_DATASET_PATH)
185
- gr.Markdown("The job will be launched at [EnergyStarAI/launch-computation-example](https://huggingface.co/spaces/EnergyStarAI/launch-computation-example).")
186
  with gr.Row():
187
  gr.Markdown("# ✉️✨ Submit your model here!", elem_classes="markdown-text")
188
- with gr.Row():
189
- with gr.Column():
190
- model_name_textbox = gr.Textbox(label="Model name")
191
- revision_name_textbox = gr.Textbox(label="Revision commit", placeholder="main")
192
- model_type = gr.Dropdown(
193
- choices=[t.to_str(" : ") for t in ModelType if t != ModelType.Unknown],
194
- label="Model type",
195
- multiselect=False,
196
- value=None,
197
- interactive=True,
198
- )
199
-
200
- with gr.Column():
201
- precision = gr.Dropdown(
202
- choices=[i.value.name for i in Precision if i != Precision.Unknown],
203
- label="Precision",
204
- multiselect=False,
205
- value="float16",
206
- interactive=True,
207
- )
208
- weight_type = gr.Dropdown(
209
- choices=[i.value.name for i in WeightType],
210
- label="Weights type",
211
- multiselect=False,
212
- value="Original",
213
- interactive=True,
214
- )
215
- base_model_name_textbox = gr.Textbox(label="Base model (for delta or adapter weights)")
216
-
217
- with gr.Row():
218
- with gr.Column():
219
- submit_button = gr.Button("Run Analysis")
220
- submission_result = gr.Markdown()
221
- submit_button.click(
222
- fn=add_new_eval,
223
- inputs=[
224
- model_name_textbox,
225
- base_model_name_textbox,
226
- revision_name_textbox,
227
- precision,
228
- weight_type,
229
- model_type,
230
- ],
231
- outputs=submission_result,
232
- )
233
 
234
  demo.launch()
 
180
 
181
 
182
  with gr.Blocks() as demo:
183
+ gr.Markdown("# This is a super basic example 'frontend'. Fill out below then click **Run** to create the request file and launch the job.")
184
+ gr.Markdown("## The request file will be written so %s." % REQUESTS_DATASET_PATH)
185
+ gr.Markdown("## The job will be launched at [EnergyStarAI/launch-computation-example](https://huggingface.co/spaces/EnergyStarAI/launch-computation-example).")
186
  with gr.Row():
187
  gr.Markdown("# ✉️✨ Submit your model here!", elem_classes="markdown-text")
188
+ with gr.Row():
189
+ with gr.Column():
190
+ model_name_textbox = gr.Textbox(label="Model name", placeholder="lvwerra/distilbert-imdb")
191
+ revision_name_textbox = gr.Textbox(label="Revision commit", placeholder="main")
192
+ model_type = gr.Dropdown(
193
+ choices=[t.to_str(" : ") for t in ModelType if t != ModelType.Unknown],
194
+ label="Model type",
195
+ placeholder="pretrained"
196
+ multiselect=False,
197
+ value=None,
198
+ interactive=True,
199
+ )
200
+
201
+ with gr.Column():
202
+ precision = gr.Dropdown(
203
+ choices=[i.value.name for i in Precision if i != Precision.Unknown],
204
+ label="Precision",
205
+ multiselect=False,
206
+ value="float16",
207
+ interactive=True,
208
+ )
209
+ weight_type = gr.Dropdown(
210
+ choices=[i.value.name for i in WeightType],
211
+ label="Weights type",
212
+ multiselect=False,
213
+ value="Original",
214
+ interactive=True,
215
+ )
216
+
217
+ with gr.Row():
218
+ with gr.Column():
219
+ submit_button = gr.Button("Run Analysis")
220
+ submission_result = gr.Markdown()
221
+ submit_button.click(
222
+ fn=add_new_eval,
223
+ inputs=[
224
+ model_name_textbox,
225
+ "",
226
+ revision_name_textbox,
227
+ precision,
228
+ weight_type,
229
+ model_type,
230
+ ],
231
+ outputs=submission_result,
232
+ )
233
 
234
  demo.launch()