File size: 635 Bytes
9d2647f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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,
)
|