Views
No views yet
1pip install -r requirements.txt
2streamlit run app.py
3
4---
5
6#### 🔹 `agents/base.py`
7
8```python
9from transformers import pipeline
10import torch
11
12# Use TinyLlama - lightweight, fits CPU
13llm = pipeline(
14 "text-generation",
15 model="TinyLlama/TinyLlama-1.1B-Chat-v1.0",
16 torch_dtype=torch.float32,
17 device_map="auto" if torch.cuda.is_available() else None,
18 max_new_tokens=256,
19 pad_token_id=2,
20 do_sample=True,
21 temperature=0.7
22)