Update app.py
Browse files
app.py
CHANGED
|
@@ -9,9 +9,9 @@ import numpy as np
|
|
| 9 |
# --- Backend Logic ---
|
| 10 |
|
| 11 |
# Step 1: Load the necessary models
|
| 12 |
-
# OPTIMIZED: Switched to 'google/flan-t5-
|
| 13 |
print("Loading models... This may take a moment, especially the first time.")
|
| 14 |
-
generator = pipeline("text2text-generation", model="google/flan-t5-
|
| 15 |
embedder = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
|
| 16 |
print("Models loaded successfully!")
|
| 17 |
|
|
|
|
| 9 |
# --- Backend Logic ---
|
| 10 |
|
| 11 |
# Step 1: Load the necessary models
|
| 12 |
+
# OPTIMIZED: Switched to 'google/flan-t5-small' for maximum speed on free hardware.
|
| 13 |
print("Loading models... This may take a moment, especially the first time.")
|
| 14 |
+
generator = pipeline("text2text-generation", model="google/flan-t5-small")
|
| 15 |
embedder = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
|
| 16 |
print("Models loaded successfully!")
|
| 17 |
|