Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
|
@@ -45,16 +45,16 @@ As is, CARROT supports routing to the following collection of large language mod
|
|
| 45 |
<p><strong>Example: Using CARROT for Routing</strong></p>
|
| 46 |
|
| 47 |
```python
|
| 48 |
-
import
|
| 49 |
|
| 50 |
# Initialize the router
|
| 51 |
-
router =
|
| 52 |
|
| 53 |
# Define a query
|
| 54 |
-
query = "What
|
| 55 |
|
| 56 |
# Get the best model for cost-performance tradeoff
|
| 57 |
-
best_model = router.route(query)
|
| 58 |
|
| 59 |
print(f"Recommended Model: {best_model}")
|
| 60 |
```
|
|
|
|
| 45 |
<p><strong>Example: Using CARROT for Routing</strong></p>
|
| 46 |
|
| 47 |
```python
|
| 48 |
+
from carrot.py import CarrotRouter
|
| 49 |
|
| 50 |
# Initialize the router
|
| 51 |
+
router = CarrotRouter(hf_token='YOUR_HF_TOKEN')
|
| 52 |
|
| 53 |
# Define a query
|
| 54 |
+
query = ["What is the value of i^i?"]
|
| 55 |
|
| 56 |
# Get the best model for cost-performance tradeoff
|
| 57 |
+
best_model = router.route(query, mu = 0.3)
|
| 58 |
|
| 59 |
print(f"Recommended Model: {best_model}")
|
| 60 |
```
|