tdecae commited on
Commit
937071b
·
verified ·
1 Parent(s): 863bb17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -43,9 +43,13 @@ vectorstore.persist()
43
 
44
 
45
  # model_name = "deepseek-ai/deepseek-llm-7b-instruct"
 
 
 
46
  model_name = "google/flan-t5-large"
 
47
  tokenizer = AutoTokenizer.from_pretrained(model_name)
48
- model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, device_map="auto")
49
 
50
  def generate(prompt):
51
  inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
 
43
 
44
 
45
  # model_name = "deepseek-ai/deepseek-llm-7b-instruct"
46
+ # tokenizer = AutoTokenizer.from_pretrained(model_name)
47
+ # model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16, device_map="auto")
48
+
49
  model_name = "google/flan-t5-large"
50
+ model = AutoModelForCausalLM.from_pretrained(model_name)
51
  tokenizer = AutoTokenizer.from_pretrained(model_name)
52
+
53
 
54
  def generate(prompt):
55
  inputs = tokenizer(prompt, return_tensors="pt").to(model.device)