img2img-turbo-sketch / preview_server.py
Inmental's picture
Upload 4 files
f59de63 verified
raw
history blame contribute delete
636 Bytes
import gradio as gr
# Variable global para almacenar la £ltima imagen generada en base64
last_image_base64 = None
def get_last_image():
return last_image_base64 if last_image_base64 else "No image processed yet."
# Crear la interfaz de Gradio para la £ltima imagen y lanzarla en el puerto 7861
last_image_interface = gr.Interface(
fn=get_last_image,
inputs=[],
outputs="text",
title="Last Processed Image",
description="Retrieve the last processed image in base64 format."
)
if __name__ == "__main__":
last_image_interface.launch(server_name="0.0.0.0", server_port=7861, share=True)