add package
Browse files
app.py
CHANGED
@@ -35,8 +35,15 @@ class LegalExpert:
|
|
35 |
torch_dtype=torch.float16,
|
36 |
trust_remote_code=True,
|
37 |
device_map="auto")
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
model_name = "google/flan-t5-xl"
|
41 |
|
42 |
self.huggingface_llm = pipeline("text-generation", model=model_name, tokenizer=AutoTokenizer.from_pretrained(model_name))
|
|
|
35 |
torch_dtype=torch.float16,
|
36 |
trust_remote_code=True,
|
37 |
device_map="auto")
|
38 |
+
|
39 |
+
self.falcon = custom_pipeline(
|
40 |
+
max_length=200,
|
41 |
+
do_sample=True,
|
42 |
+
top_k=10,
|
43 |
+
num_return_sequences=1,
|
44 |
+
eos_token_id=tokenizer.eos_token_id,)
|
45 |
+
|
46 |
+
# create llm pipeline for model
|
47 |
model_name = "google/flan-t5-xl"
|
48 |
|
49 |
self.huggingface_llm = pipeline("text-generation", model=model_name, tokenizer=AutoTokenizer.from_pretrained(model_name))
|