This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def extract_product_attributes(product_name): | |
| prompt = f"Given the product name '{product_name}', please provide its attributes in the following format:\nType: {{type}}\nMaterial: {{material}}\nSize: {{size}}\n\n" | |
| response = openai.Completion.create( | |
| engine="text-davinci-002", | |
| prompt=prompt, | |
| max_tokens=100, | |
| n=1, | |
| stop=None, | |
| temperature=0, # Set temperature to a low value for more deterministic output | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import uuid | |
| from arcservice.core import db | |
| from arcservice.models import Bundle, ProductCategory, ProductOptionSet | |
| from arcservice.models.bundles.component import ( | |
| BundleOptionSet, | |
| BundleProduct, | |
| NestedBundle, | |
| ) | |
| from arcservice.services.projects import product_svc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import pdb | |
| import random | |
| import datetime as dt | |
| from venv import create | |
| import pandas as pd | |
| from dash import Dash, html, dcc, Input, Output, State, no_update, dash_table | |
| import plotly.express as px | |
| from datetime import date |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import pdb | |
| import random | |
| import datetime as dt | |
| from venv import create | |
| import pandas as pd | |
| from dash import Dash, html, dcc, Input, Output, State, no_update, dash_table | |
| import plotly.express as px | |
| from datetime import date |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| import dash | |
| import dash_html_components as html | |
| from dash.dependencies import Input, Output, State | |
| from dash_table import DataTable | |
| import pandas as pd | |
| url = "https://github.com/plotly/datasets/raw/master/" "26k-consumer-complaints.csv" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| import dash | |
| import dash_html_components as html | |
| from dash.dependencies import Input, Output, State | |
| from dash_table import DataTable | |
| import pandas as pd | |
| url = "https://github.com/plotly/datasets/raw/master/" "26k-consumer-complaints.csv" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| import dash | |
| import dash_html_components as html | |
| from dash.dependencies import Input, Output, State | |
| from dash_table import DataTable | |
| import pandas as pd | |
| url = "https://github.com/plotly/datasets/raw/master/" "26k-consumer-complaints.csv" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from os import listdir | |
| from dash import Dash, html, dcc, Input, Output, State, dash_table | |
| import pandas as pd | |
| import plotly.express as px | |
| import random | |
| from datetime import date | |
| app = Dash( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from dash import Dash, html, dcc, Input, Output, State | |
| import pandas as pd | |
| import plotly.express as px | |
| import random | |
| from datetime import date | |
| app = Dash( | |
| __name__, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type ProductOptionSet = { | |
| id: string; | |
| name: string; | |
| is_optional: boolean; // 是否可选 | |
| default_product_id?: string; // 默认选项 | |
| products: { | |
| id: string; | |
| uuid: string; | |
| name: string; | |
| }[]; |
NewerOlder