Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,9 @@ def chunk_text(text, chunk_size=250, chunk_overlap=50):
|
|
29 |
return chunks
|
30 |
|
31 |
# Function to build FAISS index
|
32 |
-
embedding_model = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
|
|
|
|
|
33 |
def build_faiss_vectorstore(chunks):
|
34 |
vectorstore = FAISS.from_texts(chunks, embedding_model)
|
35 |
num_documents = len(vectorstore.index_to_docstore_id)
|
@@ -55,7 +57,7 @@ class ChatRequest(BaseModel):
|
|
55 |
You focus on buck bedding, terrain reading, and aggressive yet calculated mobile tactics. Your blue-collar, no-nonsense approach
|
56 |
emphasizes deep scouting, strategic access, and minimalist setups. Through The Hunting Beast, you teach hunters how to kill big bucks
|
57 |
using terrain, wind, and thermals. You speak from firsthand experience, keeping your advice practical and to the point. Provide detailed
|
58 |
-
yet concise responses
|
59 |
"""
|
60 |
temperature: float = 1.5
|
61 |
max_output_tokens: int = 200
|
@@ -117,28 +119,7 @@ async def chat(request: ChatRequest):
|
|
117 |
thick regrowth is great for food and cover, but those bucks still want an advantage. Most of the time, they’re bedding on the edges, right where the cut
|
118 |
meets older timber. They’ll set up with the wind at their back so they can smell anything sneaking up behind them, and they’re looking out into the open
|
119 |
woods, watching for danger.
|
120 |
-
|
121 |
-
User Query: How do you decide whether to hunt the edge of a bedding area or dive in close?
|
122 |
-
|
123 |
-
Good Response: That all depends on how much pressure that buck is under and what kind of intel I have. If I know exactly where he’s bedding and I’ve got the
|
124 |
-
right conditions—wind in my favor, access that won’t blow him out—I’m getting in tight. The closer you get, the less room he has to avoid you. But if I’m not
|
125 |
-
100% sure, or if the setup doesn’t allow a close approach without spooking him, I might hang back and play the fringes.
|
126 |
-
|
127 |
-
A lot of guys make the mistake of always sitting back, afraid to push in, and they end up watching bucks move just out of range over and over. I’ve been
|
128 |
-
there—it’s frustrating. If you’re seeing that happen, it’s a sign you need to be more aggressive. On the other hand, if you dive in too early without enough
|
129 |
-
intel, you can blow that buck out, and he might shift to a new area entirely.
|
130 |
-
|
131 |
-
The key is recognizing what kind of scenario you’re dealing with. If it’s early season and the buck feels comfortable, I might hang back a bit and let him
|
132 |
-
make a mistake. But if it’s the rut or I’m dealing with a pressured deer that doesn’t show himself often, I’d rather take my shot and risk bumping him than
|
133 |
-
sit back and hope. In high-pressure areas, waiting too long can cost you the deer just as much as being too aggressive.
|
134 |
-
|
135 |
-
User Query: How do you confirm a buck bed when the sign is subtle?
|
136 |
-
|
137 |
-
Good Response: Look for hair, faint depressions, old rubs, and subtle trails. A good buck bed won’t always be obvious, but the small details—broken branches, higher ground, and
|
138 |
-
past use—tell the story. Most guys walk right past them.
|
139 |
-
|
140 |
|
141 |
-
|
142 |
You have access to the following relevant information retrieved based on the user's query:
|
143 |
|
144 |
{docs}
|
|
|
29 |
return chunks
|
30 |
|
31 |
# Function to build FAISS index
|
32 |
+
# embedding_model = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
|
33 |
+
embedding_model = HuggingFaceEmbeddings(model_name="BAAI/bge-large-en")
|
34 |
+
|
35 |
def build_faiss_vectorstore(chunks):
|
36 |
vectorstore = FAISS.from_texts(chunks, embedding_model)
|
37 |
num_documents = len(vectorstore.index_to_docstore_id)
|
|
|
57 |
You focus on buck bedding, terrain reading, and aggressive yet calculated mobile tactics. Your blue-collar, no-nonsense approach
|
58 |
emphasizes deep scouting, strategic access, and minimalist setups. Through The Hunting Beast, you teach hunters how to kill big bucks
|
59 |
using terrain, wind, and thermals. You speak from firsthand experience, keeping your advice practical and to the point. Provide detailed
|
60 |
+
yet concise responses that fully articulate your experience and answer the user query.
|
61 |
"""
|
62 |
temperature: float = 1.5
|
63 |
max_output_tokens: int = 200
|
|
|
119 |
thick regrowth is great for food and cover, but those bucks still want an advantage. Most of the time, they’re bedding on the edges, right where the cut
|
120 |
meets older timber. They’ll set up with the wind at their back so they can smell anything sneaking up behind them, and they’re looking out into the open
|
121 |
woods, watching for danger.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
|
|
|
123 |
You have access to the following relevant information retrieved based on the user's query:
|
124 |
|
125 |
{docs}
|