Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,15 +13,15 @@ import subprocess
|
|
13 |
|
14 |
PLACEHOLDER = """
|
15 |
<div style="padding: 40px; text-align: center; display: flex; flex-direction: column; align-items: center;">
|
16 |
-
<img src="https://i.imgur.com/dgSNbTl.jpg" style="width: 90%; max-width: 650px; height: auto; opacity: 0.8;
|
17 |
<h1 style="font-size: 28px; margin-top: 20px; margin-bottom: 2px; opacity: 0.55;">mii-llm / Maestrale</h1>
|
18 |
<p style="font-size: 18px; margin-bottom: 2px; opacity: 0.65;">Chiedi pure...</p>
|
19 |
</div>
|
20 |
"""
|
21 |
|
22 |
DESCRIPTION = """<div>
|
23 |
-
<p>๐ฎ๐น Italian LLM <a href="https://huggingface.co/mii-llm/maestrale-chat-v0.
|
24 |
-
<p>๐ For more details about Maestrale and how to use it with <code>transformers</code>, visit the <a href="https://huggingface.co/mii-llm/maestrale-chat-v0.
|
25 |
</div>"""
|
26 |
|
27 |
_token = os.environ["HUGGINGFACE_API_KEY"]
|
@@ -82,7 +82,7 @@ def chat(message, history, system, temperature, do_sample, max_tokens):
|
|
82 |
yield partial_text
|
83 |
|
84 |
|
85 |
-
chatbot = gr.Chatbot(height=
|
86 |
|
87 |
demo = gr.ChatInterface(
|
88 |
fn=chat,
|
@@ -105,14 +105,14 @@ demo = gr.ChatInterface(
|
|
105 |
minimum=128,
|
106 |
maximum=4096,
|
107 |
step=1,
|
108 |
-
value=
|
109 |
label="Max new tokens",
|
110 |
render=False,
|
111 |
),
|
112 |
],
|
113 |
stop_btn="Stop Generation",
|
114 |
cache_examples=False,
|
115 |
-
title="Maestrale Chat v0.
|
116 |
description=DESCRIPTION
|
117 |
)
|
118 |
|
|
|
13 |
|
14 |
PLACEHOLDER = """
|
15 |
<div style="padding: 40px; text-align: center; display: flex; flex-direction: column; align-items: center;">
|
16 |
+
<img src="https://i.imgur.com/dgSNbTl.jpg" style="width: 90%; max-width: 650px; height: auto; opacity: 0.8; border-radius: 20px;">
|
17 |
<h1 style="font-size: 28px; margin-top: 20px; margin-bottom: 2px; opacity: 0.55;">mii-llm / Maestrale</h1>
|
18 |
<p style="font-size: 18px; margin-bottom: 2px; opacity: 0.65;">Chiedi pure...</p>
|
19 |
</div>
|
20 |
"""
|
21 |
|
22 |
DESCRIPTION = """<div>
|
23 |
+
<p>๐ฎ๐น Italian LLM <a href="https://huggingface.co/mii-llm/maestrale-chat-v0.4-alpha"><b>Maestrale Chat v0.4 beta</b></a>. Maestrale is a powerful language model for Italian, trained by mii-llm, based on Mistral 7B.</p>
|
24 |
+
<p>๐ For more details about Maestrale and how to use it with <code>transformers</code>, visit the <a href="https://huggingface.co/mii-llm/maestrale-chat-v0.4-alpha">model card</a>.</p>
|
25 |
</div>"""
|
26 |
|
27 |
_token = os.environ["HUGGINGFACE_API_KEY"]
|
|
|
82 |
yield partial_text
|
83 |
|
84 |
|
85 |
+
chatbot = gr.Chatbot(height=550, placeholder=PLACEHOLDER, label='Conversazione', show_copy_button=True)
|
86 |
|
87 |
demo = gr.ChatInterface(
|
88 |
fn=chat,
|
|
|
105 |
minimum=128,
|
106 |
maximum=4096,
|
107 |
step=1,
|
108 |
+
value=1024,
|
109 |
label="Max new tokens",
|
110 |
render=False,
|
111 |
),
|
112 |
],
|
113 |
stop_btn="Stop Generation",
|
114 |
cache_examples=False,
|
115 |
+
title="Maestrale Chat v0.4 Alpha",
|
116 |
description=DESCRIPTION
|
117 |
)
|
118 |
|