Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -122,6 +122,11 @@ def predict(message: str, history: list[str]) -> str:
|
|
| 122 |
|
| 123 |
|
| 124 |
# Create and run the gradio interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
gradio.ChatInterface(
|
| 126 |
predict,
|
| 127 |
examples=[
|
|
@@ -132,7 +137,8 @@ gradio.ChatInterface(
|
|
| 132 |
chatbot = gradio.Chatbot(
|
| 133 |
show_label=False,
|
| 134 |
show_copy_button=True,
|
| 135 |
-
value=[["", GREETING]]
|
|
|
|
| 136 |
),
|
| 137 |
retry_btn = None,
|
| 138 |
undo_btn = None,
|
|
|
|
| 122 |
|
| 123 |
|
| 124 |
# Create and run the gradio interface
|
| 125 |
+
CSS ="""
|
| 126 |
+
.contain { display: flex; flex-direction: column; }
|
| 127 |
+
#component-0 { height: 100%; }
|
| 128 |
+
#chatbot { flex-grow: 1; }
|
| 129 |
+
"""
|
| 130 |
gradio.ChatInterface(
|
| 131 |
predict,
|
| 132 |
examples=[
|
|
|
|
| 137 |
chatbot = gradio.Chatbot(
|
| 138 |
show_label=False,
|
| 139 |
show_copy_button=True,
|
| 140 |
+
value=[["", GREETING]],
|
| 141 |
+
css=CSS
|
| 142 |
),
|
| 143 |
retry_btn = None,
|
| 144 |
undo_btn = None,
|