vv876803 commited on
Commit
599c0a7
·
verified ·
1 Parent(s): e243703

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import os
3
+
4
+ # Function to start training
5
+ def start_training():
6
+ os.system("python train.py") # Runs your training script
7
+ return "Training Started! 🚀 Check logs in 'train_log.txt'."
8
+
9
+ # Create Gradio UI
10
+ iface = gr.Interface(
11
+ fn=start_training,
12
+ inputs=[],
13
+ outputs="text",
14
+ title="Train TinyLlama on Hugging Face Spaces",
15
+ description="Click the button below to start fine-tuning TinyLlama."
16
+ )
17
+
18
+ # Launch the Gradio app
19
+ iface.launch()