nicholasKluge
commited on
Commit
•
cd1d74f
1
Parent(s):
0ced50a
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ rewardmodel_id = "nicholasKluge/RewardModelPT"
|
|
37 |
toxicitymodel_id = "nicholasKluge/ToxicityModelPT"
|
38 |
|
39 |
# specify the device (cuda if available)
|
40 |
-
device = torch.device("
|
41 |
|
42 |
# load the models (chatbot, reward model, toxicity model)
|
43 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
@@ -100,7 +100,7 @@ with gr.Blocks(theme='freddyaboulton/dracula_revamped') as demo:
|
|
100 |
gr.Markdown("""<h1><center>Aira Demo (Portuguese) 🤓💬</h1></center>""")
|
101 |
gr.Markdown(intro)
|
102 |
|
103 |
-
chatbot = gr.Chatbot(label="Aira"
|
104 |
msg = gr.Textbox(label="Escreva uma pergunta ou instrução para Aira ...", placeholder="Olá Aira, como vai você?")
|
105 |
|
106 |
# Parameters to control the generation
|
|
|
37 |
toxicitymodel_id = "nicholasKluge/ToxicityModelPT"
|
38 |
|
39 |
# specify the device (cuda if available)
|
40 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
41 |
|
42 |
# load the models (chatbot, reward model, toxicity model)
|
43 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
|
|
100 |
gr.Markdown("""<h1><center>Aira Demo (Portuguese) 🤓💬</h1></center>""")
|
101 |
gr.Markdown(intro)
|
102 |
|
103 |
+
chatbot = gr.Chatbot(label="Aira").style(height=500)
|
104 |
msg = gr.Textbox(label="Escreva uma pergunta ou instrução para Aira ...", placeholder="Olá Aira, como vai você?")
|
105 |
|
106 |
# Parameters to control the generation
|