Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
-
|
| 5 |
-
for i in range(5):
|
| 6 |
-
yield f"Processing step {i+1}: {input_text}"
|
| 7 |
-
time.sleep(1) # Simulate processing time
|
| 8 |
-
|
| 9 |
-
gr.Interface(
|
| 10 |
-
my_streaming_function,
|
| 11 |
-
gr.Textbox(lines=2, label="Input text"),
|
| 12 |
-
gr.Textbox(streaming=True, label="Streaming output"),
|
| 13 |
-
)
|
|
|
|
| 1 |
+
import time
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
+
def test(message):
|
| 5 |
+
for i in range(len(message)):
|
| 6 |
+
time.sleep(0.3)
|
| 7 |
+
yield message[: i + 1]
|
| 8 |
|
| 9 |
+
gr.Interface(test, "textbox", "textbox").
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|