sgbaird's picture
restore py files from git lfs to regular git
b3e9379
raw
history blame
900 Bytes
import gradio as gr
from surrogate import CrabNetSurrogateModel
model = CrabNetSurrogateModel()
example_parameterization = parameterization = {
"N": 3,
"alpha": 0.5,
"d_model": 512,
"dim_feedforward": 2048,
"dropout": 0.1,
"emb_scaler": 1.0,
"epochs_step": 10,
"eps": 0.000001,
"fudge": 0.02,
"heads": 4,
"k": 6,
"lr": 0.001,
"pe_resolution": 5000,
"ple_resolution": 5000,
"pos_scaler": 1.0,
"weight_decay": 0,
"batch_size": 32,
"out_hidden4": 128,
"betas2": 0.9,
"betas1": 0.999,
"losscurve": False,
"learningcurve": False,
"bias": False,
"criterion": "RobustL1",
"elem_prop": "mat2vec",
"train_frac": 0.5,
}
model.surrogate_evaluate(example_parameterization)
def greet(name):
return "Hello " + name + "!!"
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()