Update app.py
Browse files
app.py
CHANGED
@@ -191,6 +191,16 @@ def analyze_checkpoint():
|
|
191 |
|
192 |
return "\n".join(report)
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
# Gradio Interface
|
195 |
with gr.Blocks() as demo:
|
196 |
gr.Markdown("## Βελτιωμένος Wikipedia Tokenizer Trainer")
|
|
|
191 |
|
192 |
return "\n".join(report)
|
193 |
|
194 |
+
def restart_collection():
|
195 |
+
"""Διαγράφει το checkpoint και επανεκκινεί τη συλλογή."""
|
196 |
+
global STOP_COLLECTION
|
197 |
+
STOP_COLLECTION = False
|
198 |
+
if os.path.exists(CHECKPOINT_FILE):
|
199 |
+
os.remove(CHECKPOINT_FILE)
|
200 |
+
print("🔄 Το checkpoint διαγράφηκε. Έτοιμο για νέα συλλογή.")
|
201 |
+
return "🔄 Το checkpoint διαγράφηκε. Έτοιμο για νέα συλλογή."
|
202 |
+
|
203 |
+
|
204 |
# Gradio Interface
|
205 |
with gr.Blocks() as demo:
|
206 |
gr.Markdown("## Βελτιωμένος Wikipedia Tokenizer Trainer")
|