update: submit file
Browse files- src/submission/submit.py +5 -6
src/submission/submit.py
CHANGED
|
@@ -6,7 +6,6 @@ import gradio as gr
|
|
| 6 |
from src.display.formatting import styled_error, styled_message
|
| 7 |
from src.envs import API, EVAL_REQUESTS_PATH, QUEUE_REPO
|
| 8 |
|
| 9 |
-
|
| 10 |
def add_new_eval(model: str, weight_type: str, gguf_filename=None):
|
| 11 |
user_name = ""
|
| 12 |
model_path = model
|
|
@@ -23,8 +22,8 @@ def add_new_eval(model: str, weight_type: str, gguf_filename=None):
|
|
| 23 |
return styled_error("Could not get your model information.")
|
| 24 |
|
| 25 |
if weight_type == "safetensors":
|
| 26 |
-
if gguf_filename:
|
| 27 |
-
return styled_error("GGUF filename should
|
| 28 |
|
| 29 |
# Seems good, creating the eval
|
| 30 |
print("Adding new eval")
|
|
@@ -64,8 +63,8 @@ def add_new_eval(model: str, weight_type: str, gguf_filename=None):
|
|
| 64 |
def update_gguf_input(weight_type):
|
| 65 |
return gr.update(interactive=weight_type != "safetensors")
|
| 66 |
|
| 67 |
-
|
| 68 |
-
with gr.Blocks() as
|
| 69 |
model_input = gr.Textbox(label="Model")
|
| 70 |
weight_type_input = gr.Dropdown(
|
| 71 |
label="Weight Type",
|
|
@@ -86,4 +85,4 @@ with gr.Blocks() as demo:
|
|
| 86 |
outputs=output
|
| 87 |
)
|
| 88 |
|
| 89 |
-
|
|
|
|
| 6 |
from src.display.formatting import styled_error, styled_message
|
| 7 |
from src.envs import API, EVAL_REQUESTS_PATH, QUEUE_REPO
|
| 8 |
|
|
|
|
| 9 |
def add_new_eval(model: str, weight_type: str, gguf_filename=None):
|
| 10 |
user_name = ""
|
| 11 |
model_path = model
|
|
|
|
| 22 |
return styled_error("Could not get your model information.")
|
| 23 |
|
| 24 |
if weight_type == "safetensors":
|
| 25 |
+
if len(gguf_filename) != 0:
|
| 26 |
+
return styled_error("GGUF filename should be empty when using safetensors.")
|
| 27 |
|
| 28 |
# Seems good, creating the eval
|
| 29 |
print("Adding new eval")
|
|
|
|
| 63 |
def update_gguf_input(weight_type):
|
| 64 |
return gr.update(interactive=weight_type != "safetensors")
|
| 65 |
|
| 66 |
+
|
| 67 |
+
with gr.Blocks() as app:
|
| 68 |
model_input = gr.Textbox(label="Model")
|
| 69 |
weight_type_input = gr.Dropdown(
|
| 70 |
label="Weight Type",
|
|
|
|
| 85 |
outputs=output
|
| 86 |
)
|
| 87 |
|
| 88 |
+
# app.launch()
|