Spaces:
Running
Running
Variable names, formatting
Browse files
app.py
CHANGED
@@ -145,7 +145,7 @@ def add_new_eval(
|
|
145 |
# Seems good, creating the eval
|
146 |
print("Adding request")
|
147 |
|
148 |
-
|
149 |
"model": repo_id,
|
150 |
"base_model": base_model,
|
151 |
"revision": revision,
|
@@ -166,7 +166,7 @@ def add_new_eval(
|
|
166 |
|
167 |
print("Writing out request file to %s" % out_path)
|
168 |
with open(out_path, "w") as f:
|
169 |
-
f.write(json.dumps(
|
170 |
|
171 |
|
172 |
|
@@ -177,36 +177,37 @@ with gr.Blocks() as demo:
|
|
177 |
gr.Markdown("The job will be launched at [EnergyStarAI/launch-computation-example](https://huggingface.co/spaces/EnergyStarAI/launch-computation-example).")
|
178 |
with gr.Row():
|
179 |
gr.Markdown("# ✉️✨ Submit your model here!", elem_classes="markdown-text")
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
|
|
210 |
submit_button = gr.Button("Run Analysis")
|
211 |
submission_result = gr.Markdown()
|
212 |
submit_button.click(
|
|
|
145 |
# Seems good, creating the eval
|
146 |
print("Adding request")
|
147 |
|
148 |
+
request_dict = {
|
149 |
"model": repo_id,
|
150 |
"base_model": base_model,
|
151 |
"revision": revision,
|
|
|
166 |
|
167 |
print("Writing out request file to %s" % out_path)
|
168 |
with open(out_path, "w") as f:
|
169 |
+
f.write(json.dumps(request_dict))
|
170 |
|
171 |
|
172 |
|
|
|
177 |
gr.Markdown("The job will be launched at [EnergyStarAI/launch-computation-example](https://huggingface.co/spaces/EnergyStarAI/launch-computation-example).")
|
178 |
with gr.Row():
|
179 |
gr.Markdown("# ✉️✨ Submit your model here!", elem_classes="markdown-text")
|
180 |
+
with gr.Row():
|
181 |
+
with gr.Column():
|
182 |
+
model_name_textbox = gr.Textbox(label="Model name")
|
183 |
+
revision_name_textbox = gr.Textbox(label="Revision commit", placeholder="main")
|
184 |
+
model_type = gr.Dropdown(
|
185 |
+
choices=[t.to_str(" : ") for t in ModelType if t != ModelType.Unknown],
|
186 |
+
label="Model type",
|
187 |
+
multiselect=False,
|
188 |
+
value=None,
|
189 |
+
interactive=True,
|
190 |
+
)
|
191 |
+
|
192 |
+
with gr.Column():
|
193 |
+
precision = gr.Dropdown(
|
194 |
+
choices=[i.value.name for i in Precision if i != Precision.Unknown],
|
195 |
+
label="Precision",
|
196 |
+
multiselect=False,
|
197 |
+
value="float16",
|
198 |
+
interactive=True,
|
199 |
+
)
|
200 |
+
weight_type = gr.Dropdown(
|
201 |
+
choices=[i.value.name for i in WeightType],
|
202 |
+
label="Weights type",
|
203 |
+
multiselect=False,
|
204 |
+
value="Original",
|
205 |
+
interactive=True,
|
206 |
+
)
|
207 |
+
base_model_name_textbox = gr.Textbox(label="Base model (for delta or adapter weights)")
|
208 |
+
|
209 |
+
with gr.Row():
|
210 |
+
with gr.Column()
|
211 |
submit_button = gr.Button("Run Analysis")
|
212 |
submission_result = gr.Markdown()
|
213 |
submit_button.click(
|