import gradio as gr | |
class BaseInterfaceWrapper: | |
def __init__(self, fn, inputs, outputs=None, title=None, description=None): | |
if outputs is None: | |
outputs = gr.Dataframe( | |
label="Search Results", | |
headers=["title", "body", "link"], | |
show_fullscreen_button=True, | |
show_row_numbers=True, | |
show_copy_button=True, | |
wrap=True, | |
) | |
self.interface = gr.Interface( | |
fn=fn, | |
inputs=inputs, | |
outputs=outputs, | |
title=title, | |
description=description, | |
) | |