Update README.md
Browse files
README.md
CHANGED
@@ -7,7 +7,7 @@ tags:
|
|
7 |
# What does this model do?
|
8 |
This model converts the natural language input to pandas query. It is a fine-tuned CodeT5+ 220M. This model is a part of nl2query repository which is present at https://github.com/Chirayu-Tripathi/nl2query
|
9 |
|
10 |
-
You can use this model via the github repository or via following code.
|
11 |
|
12 |
```python
|
13 |
|
@@ -19,6 +19,8 @@ tokenizer = AutoTokenizer.from_pretrained("Chirayu/nl2pandas")
|
|
19 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
20 |
model = model.to(device)
|
21 |
|
|
|
|
|
22 |
def generate_query(
|
23 |
textual_query: str,
|
24 |
num_beams: int = 10,
|
|
|
7 |
# What does this model do?
|
8 |
This model converts the natural language input to pandas query. It is a fine-tuned CodeT5+ 220M. This model is a part of nl2query repository which is present at https://github.com/Chirayu-Tripathi/nl2query
|
9 |
|
10 |
+
You can use this model via the github repository or via following code. More information can be found at the repository.
|
11 |
|
12 |
```python
|
13 |
|
|
|
19 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
20 |
model = model.to(device)
|
21 |
|
22 |
+
textual_query = '''pandas: which cabinet has average age less than 21? | titanic : passengerid, survived, pclass, name, sex, age, sibsp, parch, ticket, fare, cabin, embarked'''
|
23 |
+
|
24 |
def generate_query(
|
25 |
textual_query: str,
|
26 |
num_beams: int = 10,
|