nicolasdec commited on
Commit
c3a1556
1 Parent(s): 923e263

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -17
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 Llama3 8B</h1>
15
- <p>This Space demonstrates the instruction-tuned model <a href="https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct"><b>Meta Llama3 8b Chat</b></a>. Meta Llama3 is the new open LLM and comes in two sizes: 8b and 70b. Feel free to play with it, or duplicate to run privately!</p>
16
- <p>🔎 For more details about the Llama3 release and how to use the model with <code>transformers</code>, take a look <a href="https://huggingface.co/blog/llama3">at our blog post</a>.</p>
17
- <p>🦕 Looking for an even more powerful model? Check out the <a href="https://huggingface.co/chat/"><b>Hugging Chat</b></a> integration for Meta Llama 3 70b</p>
18
  </div>
19
  '''
20
 
@@ -22,14 +22,14 @@ LICENSE = """
22
  <p/>
23
 
24
  ---
25
- Built with Meta Llama 3
26
  """
27
 
28
  PLACEHOLDER = """
29
  <div style="padding: 30px; text-align: center; display: flex; flex-direction: column; align-items: center;">
30
- <img src="https://ysharma-dummy-chat-app.hf.space/file=/tmp/gradio/8e75e61cc9bab22b7ce3dec85ab0e6db1da5d107/Meta_lockup_positive%20primary_RGB.jpg" style="width: 80%; max-width: 550px; height: auto; opacity: 0.55; ">
31
- <h1 style="font-size: 28px; margin-bottom: 2px; opacity: 0.55;">Meta llama3</h1>
32
- <p style="font-size: 18px; margin-bottom: 2px; opacity: 0.65;">Ask me anything...</p>
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="Duplicate Space for private use", 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="⚙️ Parameters", open=False, render=False),
118
  additional_inputs=[
119
  gr.Slider(minimum=0,
120
  maximum=1,
121
  step=0.1,
122
- value=0.95,
123
- label="Temperature",
124
  render=False),
125
  gr.Slider(minimum=128,
126
  maximum=4096,
127
  step=1,
128
  value=512,
129
- label="Max new tokens",
130
  render=False ),
131
  ],
132
  examples=[
133
- ['How to setup a human base on Mars? Give short answer.'],
134
- ['Explain theory of relativity to me like I’m 8 years old.'],
135
- ['What is 9,000 * 9,000?'],
136
- ['Write a pun-filled happy birthday message to my friend Alex.'],
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,