Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,10 +11,10 @@ HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
|
| 11 |
|
| 12 |
DESCRIPTION = '''
|
| 13 |
<div>
|
| 14 |
-
<h1 style="text-align: center;">BotBot Cabra
|
| 15 |
-
<p>
|
| 16 |
-
<p>🔎
|
| 17 |
-
<p
|
| 18 |
</div>
|
| 19 |
'''
|
| 20 |
|
|
@@ -22,14 +22,14 @@ LICENSE = """
|
|
| 22 |
<p/>
|
| 23 |
|
| 24 |
---
|
| 25 |
-
|
| 26 |
"""
|
| 27 |
|
| 28 |
PLACEHOLDER = """
|
| 29 |
<div style="padding: 30px; text-align: center; display: flex; flex-direction: column; align-items: center;">
|
| 30 |
-
<img src="https://
|
| 31 |
-
<h1 style="font-size: 28px; margin-bottom: 2px; opacity: 0.55;">
|
| 32 |
-
<p style="font-size: 18px; margin-bottom: 2px; opacity: 0.65;">
|
| 33 |
</div>
|
| 34 |
"""
|
| 35 |
|
|
@@ -109,31 +109,31 @@ chatbot=gr.Chatbot(height=450, placeholder=PLACEHOLDER, label='Gradio ChatInterf
|
|
| 109 |
with gr.Blocks(fill_height=True, css=css) as demo:
|
| 110 |
|
| 111 |
gr.Markdown(DESCRIPTION)
|
| 112 |
-
gr.DuplicateButton(value="
|
| 113 |
gr.ChatInterface(
|
| 114 |
fn=chat_llama3_8b,
|
| 115 |
chatbot=chatbot,
|
| 116 |
fill_height=True,
|
| 117 |
-
additional_inputs_accordion=gr.Accordion(label="⚙️
|
| 118 |
additional_inputs=[
|
| 119 |
gr.Slider(minimum=0,
|
| 120 |
maximum=1,
|
| 121 |
step=0.1,
|
| 122 |
-
value=0.
|
| 123 |
-
label="
|
| 124 |
render=False),
|
| 125 |
gr.Slider(minimum=128,
|
| 126 |
maximum=4096,
|
| 127 |
step=1,
|
| 128 |
value=512,
|
| 129 |
-
label="Max
|
| 130 |
render=False ),
|
| 131 |
],
|
| 132 |
examples=[
|
| 133 |
-
['
|
| 134 |
-
['
|
| 135 |
-
['
|
| 136 |
-
['
|
| 137 |
['Justify why a penguin might make a good king of the jungle.']
|
| 138 |
],
|
| 139 |
cache_examples=False,
|
|
|
|
| 11 |
|
| 12 |
DESCRIPTION = '''
|
| 13 |
<div>
|
| 14 |
+
<h1 style="text-align: center;">BotBot Cabra Llama 3 8b</h1>
|
| 15 |
+
<p>Converse com o modelo <a href="https://huggingface.co/botbot-ai/CabraLlama3-8b"><b>BotBot Cabra Llama3 8b</b></a>. É bem lento por ser CPU...</p>
|
| 16 |
+
<p>🔎 Conheça os nossos outros <a href="https://huggingface.co/collections/botbot-ai/models-6604c2069ceef04f834ba99b3">modelos Cabra</a>.</p>
|
| 17 |
+
<p></p>
|
| 18 |
</div>
|
| 19 |
'''
|
| 20 |
|
|
|
|
| 22 |
<p/>
|
| 23 |
|
| 24 |
---
|
| 25 |
+
Esse modelo pode gerar inverdades, mentirar ou ofensas. Somente para teste e validação de modelos de linguagem. Poribido uso comerical.
|
| 26 |
"""
|
| 27 |
|
| 28 |
PLACEHOLDER = """
|
| 29 |
<div style="padding: 30px; text-align: center; display: flex; flex-direction: column; align-items: center;">
|
| 30 |
+
<img src="https://uploads-ssl.webflow.com/65f77c0240ae1c68f8192771/66299ba8957d9bb8fb5d1d12_image.png" style="width: 70%; max-width: 550px; height: auto; opacity: 0.6; ">
|
| 31 |
+
<h1 style="font-size: 28px; margin-bottom: 2px; opacity: 0.55;">BotBot Cabra</h1>
|
| 32 |
+
<p style="font-size: 18px; margin-bottom: 2px; opacity: 0.65;">Faça uma pergunta...</p>
|
| 33 |
</div>
|
| 34 |
"""
|
| 35 |
|
|
|
|
| 109 |
with gr.Blocks(fill_height=True, css=css) as demo:
|
| 110 |
|
| 111 |
gr.Markdown(DESCRIPTION)
|
| 112 |
+
gr.DuplicateButton(value="Duplicar espaço", elem_id="duplicate-button")
|
| 113 |
gr.ChatInterface(
|
| 114 |
fn=chat_llama3_8b,
|
| 115 |
chatbot=chatbot,
|
| 116 |
fill_height=True,
|
| 117 |
+
additional_inputs_accordion=gr.Accordion(label="⚙️ Paramentos", open=False, render=False),
|
| 118 |
additional_inputs=[
|
| 119 |
gr.Slider(minimum=0,
|
| 120 |
maximum=1,
|
| 121 |
step=0.1,
|
| 122 |
+
value=0.6,
|
| 123 |
+
label="Temperatura",
|
| 124 |
render=False),
|
| 125 |
gr.Slider(minimum=128,
|
| 126 |
maximum=4096,
|
| 127 |
step=1,
|
| 128 |
value=512,
|
| 129 |
+
label="Max novos tokens",
|
| 130 |
render=False ),
|
| 131 |
],
|
| 132 |
examples=[
|
| 133 |
+
['Como cirar uma base humana em marte, em 5 passos?'],
|
| 134 |
+
['Who is Elon Musk?'],
|
| 135 |
+
['Quem desenhou e criou Brasilia?'],
|
| 136 |
+
['Traduz o seguite texto: "The quick brown fox jumps over the lazy dog."'],
|
| 137 |
['Justify why a penguin might make a good king of the jungle.']
|
| 138 |
],
|
| 139 |
cache_examples=False,
|