Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ ds = load_dataset("FiscalNote/billsum")
|
|
12 |
# Initialize models
|
13 |
sbert_model = SentenceTransformer("all-mpnet-base-v2")
|
14 |
t5_tokenizer = AutoTokenizer.from_pretrained("t5-small")
|
15 |
-
t5_model =
|
16 |
|
17 |
# Prepare data and build FAISS index
|
18 |
texts = ds["train"]["text"][:100] # Limiting to 100 samples for speed, and selecting the train split.
|
@@ -56,4 +56,4 @@ def main():
|
|
56 |
st.warning("Please enter a query to search.")
|
57 |
|
58 |
if __name__ == "__main__":
|
59 |
-
main()
|
|
|
12 |
# Initialize models
|
13 |
sbert_model = SentenceTransformer("all-mpnet-base-v2")
|
14 |
t5_tokenizer = AutoTokenizer.from_pretrained("t5-small")
|
15 |
+
t5_model = AutoModelForSeq2SeqLM.from_pretrained("t5-small")
|
16 |
|
17 |
# Prepare data and build FAISS index
|
18 |
texts = ds["train"]["text"][:100] # Limiting to 100 samples for speed, and selecting the train split.
|
|
|
56 |
st.warning("Please enter a query to search.")
|
57 |
|
58 |
if __name__ == "__main__":
|
59 |
+
main()
|