osanseviero commited on
Commit
a0b9c0e
1 Parent(s): 11a0945

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -7,13 +7,12 @@ import torch
7
  print(f"Is CUDA available: {torch.cuda.is_available()}")
8
  print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
9
 
10
- pipe_flan = pipeline("text2text-generation", model="google/flan-t5-large", device="cuda")
11
- pipe_vanilla = pipeline("text2text-generation", model="t5-large", device="cuda")
12
 
13
  examples = [
14
- ["Translatio:0n"],
15
  ["Please answer to the following question. Who is going to be the next Ballon d'or?"],
16
- ["Q: Can Geo:0ffrey Hinton have a conversation with George Washington? Give the rationale before answering."],
17
  ["Please answer the following question. What is the boiling point of Nitrogen?"],
18
  ["Answer the following yes/no question. Can you write a whole Haiku in a single tweet?"],
19
  ["Answer the following yes/no question by reasoning step-by-step. Can you write a whole Haiku in a single tweet?"],
 
7
  print(f"Is CUDA available: {torch.cuda.is_available()}")
8
  print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
9
 
10
+ pipe_flan = pipeline("text2text-generation", model="google/flan-t5-large", device="cuda:0")
11
+ pipe_vanilla = pipeline("text2text-generation", model="t5-large", device="cuda:0")
12
 
13
  examples = [
 
14
  ["Please answer to the following question. Who is going to be the next Ballon d'or?"],
15
+ ["Q: Can Geoffrey Hinton have a conversation with George Washington? Give the rationale before answering."],
16
  ["Please answer the following question. What is the boiling point of Nitrogen?"],
17
  ["Answer the following yes/no question. Can you write a whole Haiku in a single tweet?"],
18
  ["Answer the following yes/no question by reasoning step-by-step. Can you write a whole Haiku in a single tweet?"],