Update public-apps/whisper-chat-app.livemd
Browse files
public-apps/whisper-chat-app.livemd
CHANGED
|
@@ -15,7 +15,9 @@ Mix.install(
|
|
| 15 |
## Section
|
| 16 |
|
| 17 |
```elixir
|
| 18 |
-
|
|
|
|
|
|
|
| 19 |
```
|
| 20 |
|
| 21 |
```elixir
|
|
@@ -51,7 +53,7 @@ Kino.async_listen(form, fn %{data: %{audio: audio, name: name}, origin: origin}
|
|
| 51 |
|
| 52 |
%{results: [%{text: generated_text}]} = Nx.Serving.batched_run(WhisperChat, audio)
|
| 53 |
content = Kino.Markdown.new("**#{name}**: #{generated_text}")
|
| 54 |
-
Kino.Frame.append(frame, content)
|
| 55 |
else
|
| 56 |
content = Kino.Markdown.new("*Error! Name and Audio are required*")
|
| 57 |
Kino.Frame.append(frame, content, to: origin)
|
|
|
|
| 15 |
## Section
|
| 16 |
|
| 17 |
```elixir
|
| 18 |
+
Kino.Markdown.new("""
|
| 19 |
+
This chat is open to anyone, be polite and act responsibly. :)
|
| 20 |
+
""")
|
| 21 |
```
|
| 22 |
|
| 23 |
```elixir
|
|
|
|
| 53 |
|
| 54 |
%{results: [%{text: generated_text}]} = Nx.Serving.batched_run(WhisperChat, audio)
|
| 55 |
content = Kino.Markdown.new("**#{name}**: #{generated_text}")
|
| 56 |
+
Kino.Frame.append(frame, content, temporary: true)
|
| 57 |
else
|
| 58 |
content = Kino.Markdown.new("*Error! Name and Audio are required*")
|
| 59 |
Kino.Frame.append(frame, content, to: origin)
|