Spaces:
Running
Running
Srinivasulu kethanaboina
commited on
Commit
•
c8d82dc
1
Parent(s):
5d52e09
Update app.py
Browse files
app.py
CHANGED
@@ -103,12 +103,17 @@ def predict(message, history):
|
|
103 |
# Prepare the response with logo HTML
|
104 |
response_with_logo = f'<div class="response-with-logo">{logo_html}<div class="response-text">{response}</div></div>'
|
105 |
|
|
|
|
|
|
|
|
|
106 |
# Save history to kk.txt
|
107 |
with open('kk.txt', 'a') as file:
|
108 |
file.write(history + '\n')
|
109 |
|
110 |
return response_with_logo
|
111 |
|
|
|
112 |
# Custom CSS for styling
|
113 |
css = '''
|
114 |
.circle-logo {
|
|
|
103 |
# Prepare the response with logo HTML
|
104 |
response_with_logo = f'<div class="response-with-logo">{logo_html}<div class="response-text">{response}</div></div>'
|
105 |
|
106 |
+
# Convert history to a string (if it's a list)
|
107 |
+
if isinstance(history, list):
|
108 |
+
history = ' '.join(map(str, history))
|
109 |
+
|
110 |
# Save history to kk.txt
|
111 |
with open('kk.txt', 'a') as file:
|
112 |
file.write(history + '\n')
|
113 |
|
114 |
return response_with_logo
|
115 |
|
116 |
+
|
117 |
# Custom CSS for styling
|
118 |
css = '''
|
119 |
.circle-logo {
|