type-checking / app.py
hysts's picture
hysts HF Staff
Update
0f0b328
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from collections.abc import Iterator
import gradio as gr
def generate(message: str, history: list[dict]) -> Iterator[str]:
yield "hello"
demo = gr.ChatInterface(fn=generate)
demo.launch()