Allanatrix commited on
Commit
62c9a75
·
verified ·
1 Parent(s): 6cf920a

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def simulate_tuning(learning_rate, epochs, batch_size):
4
+ score = 100 - (learning_rate * 100) + (epochs * 0.3) - (batch_size * 0.05)
5
+ return f"Estimated score: {score:.2f}"
6
+
7
+ with gr.Blocks() as rnd_app:
8
+ gr.Markdown("# Nexa R&D Tuning Sandbox")
9
+ lr = gr.Slider(0.0001, 0.1, value=0.01, label="Learning Rate")
10
+ epochs = gr.Slider(1, 100, value=10, step=1, label="Epochs")
11
+ batch = gr.Slider(1, 512, value=32, step=1, label="Batch Size")
12
+ output = gr.Textbox(label="Simulated Result")
13
+ run = gr.Button("Run Simulation")
14
+ run.click(simulate_tuning, inputs=[lr, epochs, batch], outputs=output)
15
+
16
+ rnd_app.launch()