Commit
·
e1cc40c
1
Parent(s):
72ff992
Update README.md
Browse files
README.md
CHANGED
@@ -6,6 +6,17 @@ datasets:
|
|
6 |
language:
|
7 |
- en
|
8 |
pipeline_tag: text-generation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
---
|
10 |
|
11 |
## Uses
|
|
|
6 |
language:
|
7 |
- en
|
8 |
pipeline_tag: text-generation
|
9 |
+
widget:
|
10 |
+
- text: >-
|
11 |
+
<|ASSISTANT|> Here is a possible solution to transform high haircare styling and trimming based on decision making for professionals incorporating `if`/`else` statements to handle different consent scenarios: 1. Define nodes and relationships for the graph database: ```cypher CREATE (client:Client) CREATE (stylist:Stylist)-[:HAS_CLIENT {start_date: date() }]->(client) // Relationship types used in this query MATCH (s:Service), (c:Client) WHERE s.name = 'Haircut' AND c IN [client] MERGE (s)<-[r:CONFIRMS_SERVICE]-(c); // Other relationship types could also be added here as needed ``` 2. Query to determine whether client has given their explicit consent to receive specific services: ```cypher // Get all services provided by stylists to clients MATCH (s:Stylist)-[r:PROVIDES_SERVICE*0..5]-(:Service) WITH collect(distinct s) AS stylists, r UNWIND stylists AS s OPTIONAL MATCH (c:Client)-[:HAS_CLIENT]->(sc:ServiceConsent{service:r}) RETURN s, count(*), sum(CASE WHEN sc IS NOT NULL THEN 1 ELSE 0 END) AS num_consents ORDER BY num_consents DESC; ``` 3. Example of how to use the above query to check which service a particular client has already agreed to: ```cypher // Check if client has previously granted consent to any services MATCH (s:Stylist)-[r:PROVIDES_SERVICE*0..5]-(:Service) WITH collect(distinct s) AS stylists, r UNWIND stylists AS s OPTIONAL MATCH (c:Client)-[:HAS_CLIENT]->(sc:ServiceConsent{service:r}) WHERE id(c) = <id of client> RETURN s, count(*), sum(CASE WHEN sc IS NOT NULL THEN 1 ELSE 0 END) AS num_consents; ``` 4. Code to add new consent for a new service: ```cypher // Add new consent for a new service MERGE (c:Client {id: '<id of client>'}) ON CREATE SET c.created_at=timestamp(), c.updated_at=timestamp() MERGE (s:Service {name: '<new service name>'}) ON CREATE SET s.created_at=timestamp(), s.updated_at=timestamp() MERGE (c)-[:GIVEN_SERVICE_CONSENT {consent_given: true}]->(sc:ServiceConsent {service: s}); ``` 5. Code to update existing consent for an existing service: ```cypher // Update existing consent for an existing service MATCH (c:Client {id: '<id of client>'}), (s:Service {name: '<existing service name>'}) MERGE (c)-[:GIVEN_SERVICE_CONSENT {consent_given: false}]->(oldSc:ServiceConsent) MERGE (c)-[:GIVEN_SERVICE_CONSENT {consent_given: true}]->(newSc:ServiceConsent {service: s}); DELETE oldSc; ``` 6. Code to delete consent for a service: ```cypher // Delete consent for a service MATCH (c:Client {id: '<id of client>'}), (s:Service {name: '<service name>'}) REMOVE (c)-[:GIVEN_SERVICE_CONSENT {consent_given: true}]->(sc:ServiceConsent {service: s}); ``` This approach usesNeo4j's native cypher language to define the database schema and perform queries and mutations on the graph. <|USER|>
|
12 |
+
inference:
|
13 |
+
parameters:
|
14 |
+
temperature: 0.8
|
15 |
+
do_sample: True
|
16 |
+
top_p: 0.14
|
17 |
+
top_k: 41
|
18 |
+
max_new_tokens: 250
|
19 |
+
repetition_penalty: 1.176
|
20 |
---
|
21 |
|
22 |
## Uses
|