Spaces:
Running
Running
app.py
CHANGED
|
@@ -13,13 +13,13 @@ from utils import approach1_isoflops, approach2_derivative, approach3_isoloss
|
|
| 13 |
|
| 14 |
def compute_optimal_vocab(Nnv, flops):
|
| 15 |
try:
|
| 16 |
-
Nnv = float(Nnv)
|
| 17 |
except ValueError:
|
| 18 |
return "Invalid input for Non-vocabulary Parameters."
|
| 19 |
|
| 20 |
if flops:
|
| 21 |
try:
|
| 22 |
-
flops = float(flops)
|
| 23 |
except ValueError:
|
| 24 |
return "Invalid input for FLOPs."
|
| 25 |
|
|
@@ -37,7 +37,7 @@ def compute_optimal_vocab(Nnv, flops):
|
|
| 37 |
with gr.Blocks() as demo:
|
| 38 |
with gr.Column():
|
| 39 |
gr.Markdown(
|
| 40 |
-
"""<h1>The Optimal Vocabulary Size Predictor</h1>
|
| 41 |
This tool is used to predict the optimal vocabulary size given the non-vocabulary parameters.
|
| 42 |
We provide 3 ways for prediction:
|
| 43 |
|
|
|
|
| 13 |
|
| 14 |
def compute_optimal_vocab(Nnv, flops):
|
| 15 |
try:
|
| 16 |
+
Nnv = float(eval(Nnv))
|
| 17 |
except ValueError:
|
| 18 |
return "Invalid input for Non-vocabulary Parameters."
|
| 19 |
|
| 20 |
if flops:
|
| 21 |
try:
|
| 22 |
+
flops = float(eval(flops))
|
| 23 |
except ValueError:
|
| 24 |
return "Invalid input for FLOPs."
|
| 25 |
|
|
|
|
| 37 |
with gr.Blocks() as demo:
|
| 38 |
with gr.Column():
|
| 39 |
gr.Markdown(
|
| 40 |
+
"""<img src="figures/figure_1_left_scaling_v5.png" style="float: left;" width="250" height="250"><h1>The Optimal Vocabulary Size Predictor</h1>
|
| 41 |
This tool is used to predict the optimal vocabulary size given the non-vocabulary parameters.
|
| 42 |
We provide 3 ways for prediction:
|
| 43 |
|
figure_1_left_scaling_v5.png β figures/figure_1_left_scaling_v5.png
RENAMED
|
File without changes
|