Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -418,13 +418,13 @@ def train_model_old(epochs):
|
|
418 |
return model, "\n".join(output_text)
|
419 |
|
420 |
def gradio_train(epochs):
|
421 |
-
|
422 |
model, training_log = train_model(int(epochs))
|
423 |
to_hub(model)
|
424 |
return f"{training_log}\n\nModel trained for {epochs} epochs and pushed to {model_repo_id}"
|
425 |
|
426 |
def gradio_inference(input_image):
|
427 |
-
|
428 |
output_image = run_inference(input_image) # Assuming `run_inference` returns a tuple (output_image, other_data)
|
429 |
rp(output_image)
|
430 |
# If `run_inference` returns a tuple, you should only return the image part
|
|
|
418 |
return model, "\n".join(output_text)
|
419 |
|
420 |
def gradio_train(epochs):
|
421 |
+
# Gradio training interface function
|
422 |
model, training_log = train_model(int(epochs))
|
423 |
to_hub(model)
|
424 |
return f"{training_log}\n\nModel trained for {epochs} epochs and pushed to {model_repo_id}"
|
425 |
|
426 |
def gradio_inference(input_image):
|
427 |
+
# Gradio inference interface function
|
428 |
output_image = run_inference(input_image) # Assuming `run_inference` returns a tuple (output_image, other_data)
|
429 |
rp(output_image)
|
430 |
# If `run_inference` returns a tuple, you should only return the image part
|