Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,12 +36,11 @@ async def main_interface(user_text):
|
|
| 36 |
|
| 37 |
|
| 38 |
async def respond(message, history):
|
| 39 |
-
if history is None:
|
|
|
|
| 40 |
|
| 41 |
_, response_text = await main_interface(message)
|
| 42 |
-
|
| 43 |
-
history.append({"role": "user", "content": message})
|
| 44 |
-
history.append({"role": "assistant", "content": response_text})
|
| 45 |
|
| 46 |
return "", history
|
| 47 |
|
|
@@ -68,17 +67,17 @@ body {
|
|
| 68 |
footer, .header-wrapper { display: none !important; }
|
| 69 |
|
| 70 |
#app-layout {
|
| 71 |
-
height:
|
|
|
|
| 72 |
width: 100% !important;
|
| 73 |
max-width: 800px !important;
|
| 74 |
margin: 0 auto !important;
|
| 75 |
display: flex !important;
|
| 76 |
flex-direction: column !important;
|
| 77 |
-
justify-content:
|
| 78 |
-
padding: 20px
|
| 79 |
-
|
| 80 |
box-sizing: border-box !important;
|
| 81 |
-
overflow:
|
| 82 |
}
|
| 83 |
.title-text {
|
| 84 |
text-align: center;
|
|
|
|
| 36 |
|
| 37 |
|
| 38 |
async def respond(message, history):
|
| 39 |
+
if history is None:
|
| 40 |
+
history = []
|
| 41 |
|
| 42 |
_, response_text = await main_interface(message)
|
| 43 |
+
history.append((message, response_text))
|
|
|
|
|
|
|
| 44 |
|
| 45 |
return "", history
|
| 46 |
|
|
|
|
| 67 |
footer, .header-wrapper { display: none !important; }
|
| 68 |
|
| 69 |
#app-layout {
|
| 70 |
+
min-height: 600px !important;
|
| 71 |
+
height: auto !important;
|
| 72 |
width: 100% !important;
|
| 73 |
max-width: 800px !important;
|
| 74 |
margin: 0 auto !important;
|
| 75 |
display: flex !important;
|
| 76 |
flex-direction: column !important;
|
| 77 |
+
justify-content: flex-start !important;
|
| 78 |
+
padding: 20px !important;
|
|
|
|
| 79 |
box-sizing: border-box !important;
|
| 80 |
+
overflow-y: auto !important;
|
| 81 |
}
|
| 82 |
.title-text {
|
| 83 |
text-align: center;
|