dynamic-hfspaces / sepia_tab.py
LPX55
Refactor app.py to utilize shared functions for greeting, calculation, and image processing, enhancing modularity and code reuse. Introduce space loading tabs for dynamic integration of popular Hugging Face Spaces.
4cc700d
raw
history blame contribute delete
320 Bytes
import gradio as gr
from shared_functions import sepia
def sepia_tab():
gr.Markdown("## Sepia Image Filter")
image_input = gr.Image(label="Input Image", type="numpy")
sepia_btn = gr.Button("Apply Sepia")
image_output = gr.Image(label="Sepia Image")
sepia_btn.click(sepia, image_input, image_output)