Update app.py
Browse files
app.py
CHANGED
@@ -136,18 +136,17 @@ with demo:
|
|
136 |
with gr.Row():
|
137 |
gr.Markdown("# ✉️✨ Submit your model here!", elem_classes="markdown-text")
|
138 |
with gr.Row():
|
139 |
-
|
140 |
-
# ... (Other code)
|
141 |
|
142 |
-
revision_name_textbox = gr.Textbox(label="Revision commit", placeholder="main")
|
143 |
-
model_type = gr.Dropdown(
|
144 |
-
choices=[t.to_str(" : ") for t in ModelType if t.value != ModelType.Unknown.value],
|
145 |
-
label="Model type",
|
146 |
-
multiselect=False,
|
147 |
-
value=None,
|
148 |
-
interactive=True,
|
149 |
-
)
|
150 |
with gr.Column():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
precision = gr.Dropdown(
|
152 |
choices=[i.value.name for i in Precision if i.value != Precision.Unknown.value],
|
153 |
label="Precision",
|
@@ -155,41 +154,41 @@ with gr.Column():
|
|
155 |
value="float16",
|
156 |
interactive=True,
|
157 |
)
|
158 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
# ... (Rest of your code)
|
161 |
-
model_type = gr.Dropdown(
|
162 |
-
choices=[t.to_str(" : ") for t in ModelType if t.value != ModelType.Unknown.value],
|
163 |
-
label="Model type",
|
164 |
-
multiselect=False,
|
165 |
-
value=None,
|
166 |
-
interactive=True,
|
167 |
-
# Closing parenthesis added here
|
168 |
-
)
|
169 |
-
base_model_name_textbox = gr.Textbox(label="Base model (for delta or adapter weights)")
|
170 |
-
model_name_textbox = gr.Textbox(label="Model name") # Add this line
|
171 |
-
submit_button = gr.Button("Submit Eval")
|
172 |
-
submission_result = gr.Markdown()
|
173 |
-
with gr.Row():
|
174 |
-
with gr.Accordion("📙 Citation", open=False):
|
175 |
-
citation_button = gr.Textbox(
|
176 |
-
value=CITATION_BUTTON_TEXT,
|
177 |
-
label=CITATION_BUTTON_LABEL,
|
178 |
-
lines=20,
|
179 |
-
elem_id="citation-button",
|
180 |
-
show_copy_button=True,
|
181 |
-
)
|
182 |
-
submit_button.click(
|
183 |
-
add_new_eval,
|
184 |
-
[
|
185 |
-
model_name_textbox,
|
186 |
-
base_model_name_textbox,
|
187 |
-
revision_name_textbox,
|
188 |
-
precision,
|
189 |
-
weight_type,
|
190 |
-
model_type,
|
191 |
-
],
|
192 |
-
submission_result,
|
193 |
)
|
194 |
start_button = gr.Button("Start", elem_id="start_button")
|
195 |
scheduler = BackgroundScheduler()
|
|
|
136 |
with gr.Row():
|
137 |
gr.Markdown("# ✉️✨ Submit your model here!", elem_classes="markdown-text")
|
138 |
with gr.Row():
|
139 |
+
# ... (Your existing code)
|
|
|
140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
with gr.Column():
|
142 |
+
revision_name_textbox = gr.Textbox(label="Revision commit", placeholder="main")
|
143 |
+
model_type = gr.Dropdown(
|
144 |
+
choices=[t.to_str(" : ") for t in ModelType if t.value != ModelType.Unknown.value],
|
145 |
+
label="Model type",
|
146 |
+
multiselect=False,
|
147 |
+
value=None,
|
148 |
+
interactive=True,
|
149 |
+
)
|
150 |
precision = gr.Dropdown(
|
151 |
choices=[i.value.name for i in Precision if i.value != Precision.Unknown.value],
|
152 |
label="Precision",
|
|
|
154 |
value="float16",
|
155 |
interactive=True,
|
156 |
)
|
157 |
+
weight_type = gr.Dropdown(
|
158 |
+
choices=[i.value.name for i in WeightType],
|
159 |
+
label="Weights type",
|
160 |
+
multiselect=False,
|
161 |
+
value="Original",
|
162 |
+
interactive=True,
|
163 |
+
)
|
164 |
+
base_model_name_textbox = gr.Textbox(label="Base model (for delta or adapter weights)")
|
165 |
+
model_name_textbox = gr.Textbox(label="Model name")
|
166 |
+
|
167 |
+
submit_button = gr.Button("Submit Eval")
|
168 |
+
submission_result = gr.Markdown()
|
169 |
+
with gr.Row():
|
170 |
+
with gr.Accordion("📙 Citation", open=False):
|
171 |
+
citation_button = gr.Textbox(
|
172 |
+
value=CITATION_BUTTON_TEXT,
|
173 |
+
label=CITATION_BUTTON_LABEL,
|
174 |
+
lines=20,
|
175 |
+
elem_id="citation-button",
|
176 |
+
show_copy_button=True,
|
177 |
+
)
|
178 |
+
submit_button.click(
|
179 |
+
add_new_eval,
|
180 |
+
[
|
181 |
+
model_name_textbox,
|
182 |
+
base_model_name_textbox,
|
183 |
+
revision_name_textbox,
|
184 |
+
precision,
|
185 |
+
weight_type,
|
186 |
+
model_type,
|
187 |
+
],
|
188 |
+
submission_result,
|
189 |
+
)
|
190 |
|
191 |
# ... (Rest of your code)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
)
|
193 |
start_button = gr.Button("Start", elem_id="start_button")
|
194 |
scheduler = BackgroundScheduler()
|