Bug fixed
Browse files
app.py
CHANGED
@@ -29,18 +29,13 @@ class LegalExpert:
|
|
29 |
# falcon model
|
30 |
model_name = "tiiuae/falcon-7b-instruct"
|
31 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
32 |
-
|
33 |
model=model_name,
|
34 |
tokenizer=tokenizer,
|
35 |
torch_dtype=torch.float16,
|
36 |
trust_remote_code=True,
|
37 |
device_map="auto")
|
38 |
-
|
39 |
-
self.falcon = custom_pipeline( max_length=200,
|
40 |
-
do_sample=True,
|
41 |
-
top_k=10,
|
42 |
-
num_return_sequences=1,
|
43 |
-
eos_token_id=tokenizer.eos_token_id,)
|
44 |
|
45 |
# create llm pipeline for model
|
46 |
model_name = "google/flan-t5-xl"
|
|
|
29 |
# falcon model
|
30 |
model_name = "tiiuae/falcon-7b-instruct"
|
31 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
32 |
+
self.falcon_llm = pipeline("text-generation",
|
33 |
model=model_name,
|
34 |
tokenizer=tokenizer,
|
35 |
torch_dtype=torch.float16,
|
36 |
trust_remote_code=True,
|
37 |
device_map="auto")
|
38 |
+
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
# create llm pipeline for model
|
41 |
model_name = "google/flan-t5-xl"
|