Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,17 +8,17 @@ client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
|
8 |
|
9 |
html_user="""
|
10 |
<div class="user_chat">
|
11 |
-
|
12 |
</div>
|
13 |
"""
|
14 |
html_bot="""
|
15 |
<div class="bot_chat">
|
16 |
-
|
17 |
</div>
|
18 |
"""
|
19 |
html_card="""
|
20 |
<div class="chat_card">
|
21 |
-
|
22 |
</div>
|
23 |
"""
|
24 |
|
@@ -29,9 +29,9 @@ def get_screenshot(chat,css=None):
|
|
29 |
for user,bot in chat:
|
30 |
print (f'user::{user}')
|
31 |
print (f'bot::{bot}')
|
32 |
-
html_body += html_user.
|
33 |
-
html_body += html_bot.
|
34 |
-
html=html_card.
|
35 |
#css = css
|
36 |
#hti.screenshot(html_str=html, save_as='red_page.png')
|
37 |
#hti.screenshot(html_str=html_card, css_str=css, save_as='red_page.png')
|
|
|
8 |
|
9 |
html_user="""
|
10 |
<div class="user_chat">
|
11 |
+
$chat
|
12 |
</div>
|
13 |
"""
|
14 |
html_bot="""
|
15 |
<div class="bot_chat">
|
16 |
+
$chat
|
17 |
</div>
|
18 |
"""
|
19 |
html_card="""
|
20 |
<div class="chat_card">
|
21 |
+
$body
|
22 |
</div>
|
23 |
"""
|
24 |
|
|
|
29 |
for user,bot in chat:
|
30 |
print (f'user::{user}')
|
31 |
print (f'bot::{bot}')
|
32 |
+
html_body += html_user.replace("$chat",user)
|
33 |
+
html_body += html_bot.replace("$chat",bot)
|
34 |
+
html=html_card.replace("$body",html_body)
|
35 |
#css = css
|
36 |
#hti.screenshot(html_str=html, save_as='red_page.png')
|
37 |
#hti.screenshot(html_str=html_card, css_str=css, save_as='red_page.png')
|