Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
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)
|