Spaces:
Running
Running
Add application file
Browse files
app.py
CHANGED
|
@@ -32,7 +32,7 @@ def compute_optimal_vocab(Nnv: float,
|
|
| 32 |
with gr.Blocks() as demo:
|
| 33 |
with gr.Column():
|
| 34 |
gr.Markdown(
|
| 35 |
-
"""<img src="figure_1_left_scaling_v5.png" style="float: left;" width="250" height="250"><h1>The Optimal
|
| 36 |
This tool is used to predict the optimal vocabulary size given the non-vocabulary parameters.
|
| 37 |
We provide 3 ways for prediction:
|
| 38 |
|
|
@@ -53,11 +53,11 @@ with gr.Blocks() as demo:
|
|
| 53 |
with gr.Row():
|
| 54 |
btn = gr.Button("Compute the optimal vocabulary size")
|
| 55 |
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
demo.launch()
|
| 62 |
|
| 63 |
# import gradio as gr
|
|
|
|
| 32 |
with gr.Blocks() as demo:
|
| 33 |
with gr.Column():
|
| 34 |
gr.Markdown(
|
| 35 |
+
"""<img src="https://github.com/sail-sg/scaling-with-vocab/blob/main/figures/figure_1_left_scaling_v5.png" style="float: left;" width="250" height="250"><h1>The Optimal Vocabulary Size Predictor</h1>
|
| 36 |
This tool is used to predict the optimal vocabulary size given the non-vocabulary parameters.
|
| 37 |
We provide 3 ways for prediction:
|
| 38 |
|
|
|
|
| 53 |
with gr.Row():
|
| 54 |
btn = gr.Button("Compute the optimal vocabulary size")
|
| 55 |
|
| 56 |
+
btn.click(
|
| 57 |
+
compute_optimal_vocab,
|
| 58 |
+
inputs=[Nnv, flops],
|
| 59 |
+
outputs=output_text
|
| 60 |
+
)
|
| 61 |
demo.launch()
|
| 62 |
|
| 63 |
# import gradio as gr
|