Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,7 +49,7 @@ containing atleast 10 columns along with their descriptions.''')
|
|
| 49 |
|
| 50 |
schema_relations = model_response(f'''Based on the context: {py}, generate a knowledge graph represented using ASCII art. Also generate a brief description of the graph.
|
| 51 |
Output:
|
| 52 |
-
Description of the graph listing all the relationships
|
| 53 |
ASCII version of the knowledge graph with nodes represented by tables and edges represented by the relationships. Edges should be annotated with the type of relationships identified - many-to-one, many-to-many, one-to-one, primary key, self joins, foreign keys etc''')
|
| 54 |
yield dataset_description, py, schema_relations, None, None, None, None
|
| 55 |
generated_glossary = model_response(f'''Based on the relationships identified: {schema_relations}
|
|
@@ -71,6 +71,7 @@ containing atleast 10 columns along with their descriptions.''')
|
|
| 71 |
- Then output the relationships between the business terms as follows:
|
| 72 |
term -> [related_term1, related_term2]
|
| 73 |
Show the relationship between the glossary term and the column broken down by each table.
|
|
|
|
| 74 |
''')
|
| 75 |
yield dataset_description, py, schema_relations, generated_glossary, None, None, None
|
| 76 |
queries = generate_dataset_queries(dataset, generated_glossary, schema_relations)
|
|
@@ -105,7 +106,7 @@ iface = gr.Interface(
|
|
| 105 |
live=False,
|
| 106 |
theme = gr.themes.Ocean(),
|
| 107 |
title="BQ knowledge engine ⚙️💡📊 (Simulator)",
|
| 108 |
-
description="Provide a dataset ID to generate LookML, schema relationships, glossary, and more
|
| 109 |
article = "This is a simulator that provides a sneak-peek into how BQ knowledge engine works."
|
| 110 |
)
|
| 111 |
# Launch the app
|
|
|
|
| 49 |
|
| 50 |
schema_relations = model_response(f'''Based on the context: {py}, generate a knowledge graph represented using ASCII art. Also generate a brief description of the graph.
|
| 51 |
Output:
|
| 52 |
+
Description of the graph listing all the relationships in markdown format
|
| 53 |
ASCII version of the knowledge graph with nodes represented by tables and edges represented by the relationships. Edges should be annotated with the type of relationships identified - many-to-one, many-to-many, one-to-one, primary key, self joins, foreign keys etc''')
|
| 54 |
yield dataset_description, py, schema_relations, None, None, None, None
|
| 55 |
generated_glossary = model_response(f'''Based on the relationships identified: {schema_relations}
|
|
|
|
| 71 |
- Then output the relationships between the business terms as follows:
|
| 72 |
term -> [related_term1, related_term2]
|
| 73 |
Show the relationship between the glossary term and the column broken down by each table.
|
| 74 |
+
Ensure that the output is in markdown format
|
| 75 |
''')
|
| 76 |
yield dataset_description, py, schema_relations, generated_glossary, None, None, None
|
| 77 |
queries = generate_dataset_queries(dataset, generated_glossary, schema_relations)
|
|
|
|
| 106 |
live=False,
|
| 107 |
theme = gr.themes.Ocean(),
|
| 108 |
title="BQ knowledge engine ⚙️💡📊 (Simulator)",
|
| 109 |
+
description="Provide a dataset ID to generate LookML, schema relationships, glossary, and more...", examples=['ncaa_basketball2', 'thelook_ecommerce','geo_openstreetmap','google_political_ads','noaa_historic_severe_storms','stackoverflow'],
|
| 110 |
article = "This is a simulator that provides a sneak-peek into how BQ knowledge engine works."
|
| 111 |
)
|
| 112 |
# Launch the app
|