Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
|
| 3 |
-
# from transformers import AutoModel, AutoTokenizer
|
| 4 |
|
| 5 |
def load_model(model_link):
|
| 6 |
-
# model = AutoModel.from_pretrained(model_link)
|
| 7 |
return "model"
|
| 8 |
|
| 9 |
def update_config(quantization_type, bits, threshold):
|
|
@@ -18,15 +16,17 @@ def run_benchmark(model, config):
|
|
| 18 |
with gr.Blocks() as demo:
|
| 19 |
with gr.Tab("Model Loading"):
|
| 20 |
model_input = gr.Textbox(label="Hugging Face Model Link")
|
| 21 |
-
model_type = gr.Dropdown(choices=["
|
|
|
|
| 22 |
load_btn = gr.Button("Load Model")
|
| 23 |
|
| 24 |
with gr.Tab("Quantization"):
|
| 25 |
-
quant_type = gr.Dropdown(choices=["
|
| 26 |
bits = gr.Slider(minimum=4, maximum=8, step=1, label="Bits")
|
| 27 |
threshold = gr.Slider(minimum=0, maximum=1, label="Threshold")
|
| 28 |
|
| 29 |
with gr.Tab("Benchmarking"):
|
|
|
|
| 30 |
benchmark_btn = gr.Button("Run Benchmark")
|
| 31 |
results = gr.JSON(label="Benchmark Results")
|
| 32 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
|
|
|
|
| 3 |
|
| 4 |
def load_model(model_link):
|
|
|
|
| 5 |
return "model"
|
| 6 |
|
| 7 |
def update_config(quantization_type, bits, threshold):
|
|
|
|
| 16 |
with gr.Blocks() as demo:
|
| 17 |
with gr.Tab("Model Loading"):
|
| 18 |
model_input = gr.Textbox(label="Hugging Face Model Link")
|
| 19 |
+
model_type = gr.Dropdown(choices=["LLM", "CV", "MLP"], label="Model Type")
|
| 20 |
+
model = gr.Dropdown(choices=["BERT", "GPT", "T5"], label="Model")
|
| 21 |
load_btn = gr.Button("Load Model")
|
| 22 |
|
| 23 |
with gr.Tab("Quantization"):
|
| 24 |
+
quant_type = gr.Dropdown(choices=["awg", "gptq", "4bit"], label="Quantization Type")
|
| 25 |
bits = gr.Slider(minimum=4, maximum=8, step=1, label="Bits")
|
| 26 |
threshold = gr.Slider(minimum=0, maximum=1, label="Threshold")
|
| 27 |
|
| 28 |
with gr.Tab("Benchmarking"):
|
| 29 |
+
data_input = gr.Textbox(label="Hugging Face data Input")
|
| 30 |
benchmark_btn = gr.Button("Run Benchmark")
|
| 31 |
results = gr.JSON(label="Benchmark Results")
|
| 32 |
|