File size: 584 Bytes
cc70e87 2f0960b cc70e87 2f0960b cc70e87 f81e511 2f0960b f81e511 2f0960b f81e511 cc70e87 2f0960b cc70e87 d2a7c88 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import gradio as gr
from components import AITask, CodeTask
from examples import demo_buttons, demo_tasks
DEMO_ID = __name__
tasks = [
CodeTask(
0,
"https://huggingface.co/",
visible=True,
code_value="Get text from a website. No html. No empty lines.",
),
AITask(1, "Summarize: {t0}", visible=True),
]
demo_tasks[DEMO_ID] = tasks
def render():
with gr.Tab("Example: Summarize a website"):
demo_id = gr.Textbox(DEMO_ID, visible=False)
tasks[0].render()
tasks[1].render()
demo_buttons(demo_id, tasks)
|