Spaces:
Runtime error
Runtime error
Update
Browse files
app.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
from typing import TYPE_CHECKING
|
| 3 |
+
|
| 4 |
+
if TYPE_CHECKING:
|
| 5 |
+
from collections.abc import Iterator
|
| 6 |
+
|
| 7 |
+
import gradio as gr
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
def generate(message: str, history: list[dict]) -> Iterator[str]:
|
| 11 |
+
yield "hello"
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
demo = gr.ChatInterface(fn=generate)
|
| 15 |
+
demo.launch()
|