Seraph19 commited on
Commit
117eb66
1 Parent(s): 65118f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +56 -61
app.py CHANGED
@@ -96,7 +96,6 @@ def display_user_data(user_id):
96
  return "User not found"
97
 
98
  demo = gr.Blocks(css=custom_css)
99
-
100
  with demo:
101
  gr.HTML(TITLE)
102
  gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
@@ -133,64 +132,60 @@ with demo:
133
  datatype=EVAL_TYPES,
134
  row_count=5,
135
  )
136
- with gr.Row():
137
- with gr.Column():
138
- revision_name_textbox = gr.Textbox(label="Revision commit", placeholder="main")
139
- model_type = gr.Dropdown(
140
- choices=[t.to_str(" : ") for t in ModelType if t.value != ModelType.Unknown.value],
141
- label="Model type",
142
- multiselect=False,
143
- value=None,
144
- interactive=True,
145
- )
146
- with gr.Column():
147
- precision = gr.Dropdown(
148
- choices=[i.value.name for i in Precision if i.value != Precision.Unknown.value],
149
- label="Precision",
150
- multiselect=False,
151
- value="float16",
152
- interactive=True,
153
- )
154
- weight_type = gr.Dropdown(
155
- choices=[i.value.name for i in WeightType],
156
- label="Weights type",
157
- multiselect=False,
158
- value="Original",
159
- interactive=True,
160
- )
161
- base_model_name_textbox = gr.Textbox(label="Base model (for delta or adapter weights)")
162
- model_name_textbox = gr.Textbox(label="Model name")
163
-
164
- submit_button = gr.Button("Submit Eval")
165
- submission_result = gr.Markdown()
166
- with gr.Row():
167
- with gr.Accordion("📙 Citation", open=False):
168
- citation_button = gr.Textbox(
169
- value=CITATION_BUTTON_TEXT,
170
- label=CITATION_BUTTON_LABEL,
171
- lines=20,
172
- elem_id="citation-button",
173
- show_copy_button=True,
174
- )
175
- submit_button.click(
176
- add_new_eval,
177
- [
178
- model_name_textbox,
179
- base_model_name_textbox,
180
- revision_name_textbox,
181
- precision,
182
- weight_type,
183
- model_type,
184
- ],
185
- submission_result,
186
- )
187
- with demo:
188
- gr.HTML(TITLE)
189
- gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
190
- # Your model submission form here
191
-
192
- start_button = gr.Button("Start", elem_id="start_button")
193
- scheduler = BackgroundScheduler()
194
- scheduler.add_job(restart_space, "interval", seconds=1800)
195
- scheduler.start()
196
  demo.queue(default_concurrency_limit=40).launch()
 
96
  return "User not found"
97
 
98
  demo = gr.Blocks(css=custom_css)
 
99
  with demo:
100
  gr.HTML(TITLE)
101
  gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
 
132
  datatype=EVAL_TYPES,
133
  row_count=5,
134
  )
135
+ with gr.Row():
136
+ gr.Markdown("# ✉️✨ Submit your model here!", elem_classes="markdown-text")
137
+ with gr.Row():
138
+ with gr.Column():
139
+ revision_name_textbox = gr.Textbox(label="Revision commit", placeholder="main")
140
+ model_type = gr.Dropdown(
141
+ choices=[t.to_str(" : ") for t in ModelType if t.value != ModelType.Unknown.value],
142
+ label="Model type",
143
+ multiselect=False,
144
+ value=None,
145
+ interactive=True,
146
+ )
147
+ with gr.Column():
148
+ precision = gr.Dropdown(
149
+ choices=[i.value.name for i in Precision if i.value != Precision.Unknown.value],
150
+ label="Precision",
151
+ multiselect=False,
152
+ value="float16",
153
+ interactive=True,
154
+ )
155
+ weight_type = gr.Dropdown(
156
+ choices=[i.value.name for i in WeightType],
157
+ label="Weights type",
158
+ multiselect=False,
159
+ value="Original",
160
+ interactive=True,
161
+ )
162
+ base_model_name_textbox = gr.Textbox(label="Base model (for delta or adapter weights)")
163
+ model_name_textbox = gr.Textbox(label="Model name") # Add this line
164
+ submit_button = gr.Button("Submit Eval")
165
+ submission_result = gr.Markdown()
166
+ with gr.Row():
167
+ with gr.Accordion("📙 Citation", open=False):
168
+ citation_button = gr.Textbox(
169
+ value=CITATION_BUTTON_TEXT,
170
+ label=CITATION_BUTTON_LABEL,
171
+ lines=20,
172
+ elem_id="citation-button",
173
+ show_copy_button=True,
174
+ )
175
+ submit_button.click(
176
+ add_new_eval,
177
+ [
178
+ model_name_textbox,
179
+ base_model_name_textbox,
180
+ revision_name_textbox,
181
+ precision,
182
+ weight_type,
183
+ model_type,
184
+ ],
185
+ submission_result,
186
+ )
187
+ start_button = gr.Button("Start", elem_id="start_button")
188
+ scheduler = BackgroundScheduler()
189
+ scheduler.add_job(restart_space, "interval", seconds=1800)
190
+ scheduler.start()
 
 
 
 
191
  demo.queue(default_concurrency_limit=40).launch()