Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ import os
|
|
| 9 |
import torch.nn.functional as F
|
| 10 |
|
| 11 |
num_return_sequences = 1
|
| 12 |
-
max_length =
|
| 13 |
|
| 14 |
|
| 15 |
@dataclass
|
|
@@ -87,5 +87,11 @@ def chat_fn(message, history):
|
|
| 87 |
|
| 88 |
|
| 89 |
gr.ChatInterface(chat_fn, examples=examples,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
title="GPT2 trained from scratch on Shakespeare dataset").launch()
|
| 91 |
-
|
|
|
|
| 9 |
import torch.nn.functional as F
|
| 10 |
|
| 11 |
num_return_sequences = 1
|
| 12 |
+
max_length = 100
|
| 13 |
|
| 14 |
|
| 15 |
@dataclass
|
|
|
|
| 87 |
|
| 88 |
|
| 89 |
gr.ChatInterface(chat_fn, examples=examples,
|
| 90 |
+
chatbot=gr.Chatbot(height=300),
|
| 91 |
+
textbox=gr.Textbox(placeholder="Ask me a yes or no question", container=False, scale=7),
|
| 92 |
+
theme="soft",
|
| 93 |
+
cache_examples=True,
|
| 94 |
+
retry_btn=None,
|
| 95 |
+
undo_btn="Delete Previous",
|
| 96 |
+
clear_btn="Clear",
|
| 97 |
title="GPT2 trained from scratch on Shakespeare dataset").launch()
|
|
|