vprashant commited on
Commit
6b42843
·
verified ·
1 Parent(s): e4b3c1f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +33 -16
README.md CHANGED
@@ -1,26 +1,43 @@
1
  ---
2
- library_name: transformers
3
- tags: []
4
- ---
5
-
6
- # prompt: write a model card in markdow for huggingface
7
-
8
- %%writefile README.md
9
- ---
10
  tags:
11
- - text2cypher
12
- - cypher
13
- - neo4j
14
- - natural-language-processing
15
- - artificial-intelligence
16
  widget:
17
- - text: "Which employees joined the company after 2015?"
18
  ---
19
 
20
  # Cypher Query Generator
21
 
22
- This model is a fine-tuned T5 model that can generate Cypher queries from natural language descriptions. It was trained on a dataset of WikiSQL examples converted to Cypher queries.
 
 
 
 
 
 
23
 
24
  ## How to Use
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
- You can use this model to generate Cypher queries from natural language descriptions. For example, to generate a Cypher query that finds all employees who joined the company after 2015, you can use the following code:
 
1
  ---
 
 
 
 
 
 
 
 
2
  tags:
3
+ - text2cypher
4
+ - cypher
5
+ - neo4j
6
+ - natural-language-processing
7
+ - artificial-intelligence
8
  widget:
9
+ - text: "Which employees joined the company after 2015?"
10
  ---
11
 
12
  # Cypher Query Generator
13
 
14
+ ## Model Overview
15
+ The Cypher Query Generator is a fine-tuned T5 model designed to translate natural language descriptions into Cypher queries. This model was trained on a dataset derived from WikiSQL examples that have been converted into Cypher queries, making it well-suited for generating queries compatible with Neo4j databases.
16
+
17
+ ## Model Details
18
+ - **Architecture**: T5
19
+ - **Training Data**: WikiSQL examples converted to Cypher queries
20
+ - **Primary Use Case**: Generating Cypher queries from natural language descriptions
21
 
22
  ## How to Use
23
+ To generate a Cypher query using this model, you can provide a natural language description, and the model will output the corresponding Cypher query. For instance, if you want to find all employees who joined the company after 2015, you can use the following Python code:
24
+
25
+ ```python
26
+ from transformers import T5Tokenizer, T5ForConditionalGeneration
27
+
28
+ # Load pre-trained model and tokenizer
29
+ model_name = 'your-model-name-here'
30
+ tokenizer = T5Tokenizer.from_pretrained(model_name)
31
+ model = T5ForConditionalGeneration.from_pretrained(model_name)
32
+
33
+ # Define input
34
+ input_text = "Which employees joined the company after 2015?"
35
+
36
+ # Tokenize input
37
+ inputs = tokenizer.encode(input_text, return_tensors='pt')
38
+
39
+ # Generate Cypher query
40
+ outputs = model.generate(inputs)
41
+ cypher_query = tokenizer.decode(outputs[0], skip_special_tokens=True)
42
 
43
+ print("Generated Cypher Query:", cypher_query)