|
|
|
下記の質問に対応するコードをdjangoでアプリを作成 プロジェクトはいりません |
|
fastapiでrouter部分を作成 組み込みはメイン部分でします |
|
フロントエンドをgradioで作成 |
|
#google apps script frontend |
|
googleappsscript doGet でのgradioの表示処理を作成 google.script.runで関数は呼び出し |
|
#google apps script backend |
|
frontendからの呼び出し用のバックエンドスクリプト |
|
仕様書の作成 |
|
PlantUMLでシーケンス図の作成 |
|
Markdownでのプログラム殺名 |
|
#下記参考にAPIも作成しておいて |
|
action insert list edit update でCRUDがかわる |
|
同じようにGASのAPIも作成しておいて |
|
|
|
def create_vector(): |
|
inputs = tokenizer(result, return_tensors="pt", max_length=512, truncation=True) |
|
outputs = model(**inputs) |
|
# [CLS]トークンの出力を取得 |
|
embeddings = outputs.last_hidden_state[:,0,:].squeeze().detach().cpu().numpy().tolist() |
|
print(embeddings) |
|
import requests |
|
|
|
url = "https://kenken999-php.hf.space/api/v1.php" |
|
|
|
payload = "model_name={embeddings}&vector_text={result}&table=products&action=insert"" |
|
headers = { |
|
'X-Auth-Token': 'admin', |
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
'Cookie': 'runnerSession=muvclb78zpsdjbm7y9c3; pD1lszvk6ratOZhmmgvkp=13767810ebf0782b0b51bf72dedb63b3' |
|
} |
|
|
|
response = requests.request("POST", url, headers=headers, data=payload) |
|
|
|
print(response.text) |
|
return True |
|
|
|
下記の質問 作成対応内容 |
|
|
|
😊 |
|
|
|
Based on the customer's question on TikTok, I'll rephrase it in a way that's easy for the appraiser to understand: |
|
|
|
**Q:** 「ダイヤモンドの査定について、サイズ、カラット、クオリティー、etc. 全てを教えてください!」 |
|
|
|
**Rephrased Q:** 「ダイヤモンドの査定基準について、サイズ、カラット、カット、カラー、クオリティー、デプスなどを教えてください。」 |
|
|
|
**Refasta's YouTube URL:** |
|
https: |
|
https: |
|
https: |
|
|
|
**Q&A:** |
|
|
|
1. Q: ダイヤモンドの査定基準は何ですか? |
|
A: 我々の査定基準は、サイズ、カラット、カット、カラー、クオリティー、デプスなどを基に計算しています。 |
|
2. Q: ダイヤモンドのカラットとは何ですか? |
|
A: ダイヤモンドのカラットは、ダイヤモンドの質量を示す単位です。1カラットは0.2グラムに相当します。 |
|
3. Q: ダイヤモンドのクオリティーとは何ですか? |
|
A: ダイヤモンドのクオリティーは、ダイヤモンドの純度や透明度を示す指標です。我々は、GIAやAGSの基準に基づいて査定を行います。 |
|
|
|
**Product Search URL:** |
|
https: |
|
|
|
Please let me know if this meets your requirements! 😊 |
|
下記の質問に対応するコードをdjangoでアプリを作成 プロジェクトはいりません |
|
fastapiでrouter部分を作成 組み込みはメイン部分でします |
|
フロントエンドをgradioで作成 |
|
#google apps script frontend |
|
googleappsscript doGet でのgradioの表示処理を作成 google.script.runで関数は呼び出し |
|
#google apps script backend |
|
frontendからの呼び出し用のバックエンドスクリプト |
|
仕様書の作成 |
|
PlantUMLでシーケンス図の作成 |
|
Markdownでのプログラム殺名 |
|
#下記参考にAPIも作成しておいて |
|
action insert list edit update でCRUDがかわる |
|
同じようにGASのAPIも作成しておいて |
|
|
|
def create_vector(): |
|
inputs = tokenizer(result, return_tensors="pt", max_length=512, truncation=True) |
|
outputs = model(**inputs) |
|
# [CLS]トークンの出力を取得 |
|
embeddings = outputs.last_hidden_state[:,0,:].squeeze().detach().cpu().numpy().tolist() |
|
print(embeddings) |
|
import requests |
|
|
|
url = "https://kenken999-php.hf.space/api/v1.php" |
|
|
|
payload = "model_name={embeddings}&vector_text={result}&table=products&action=insert"" |
|
headers = { |
|
'X-Auth-Token': 'admin', |
|
'Content-Type': 'application/x-www-form-urlencoded', |
|
'Cookie': 'runnerSession=muvclb78zpsdjbm7y9c3; pD1lszvk6ratOZhmmgvkp=13767810ebf0782b0b51bf72dedb63b3' |
|
} |
|
|
|
response = requests.request("POST", url, headers=headers, data=payload) |
|
|
|
print(response.text) |
|
return True |
|
|
|
下記の質問 作成対応内容 |
|
|
|
😊 |
|
|
|
Based on the customer's question on TikTok, I'll rephrase it in a way that's easy for the appraiser to understand: |
|
|
|
**Q:** 「ダイヤモンドの査定について、サイズ、カラット、クオリティー、etc. 全てを教えてください!」 |
|
|
|
**Rephrased Q:** 「ダイヤモンドの査定基準について、サイズ、カラット、カット、カラー、クオリティー、デプスなどを教えてください。」 |
|
|
|
**Refasta's YouTube URL:** |
|
https: |
|
https: |
|
https: |
|
|
|
**Q&A:** |
|
|
|
1. Q: ダイヤモンドの査定基準は何ですか? |
|
A: 我々の査定基準は、サイズ、カラット、カット、カラー、クオリティー、デプスなどを基に計算しています。 |
|
2. Q: ダイヤモンドのカラットとは何ですか? |
|
A: ダイヤモンドのカラットは、ダイヤモンドの質量を示す単位です。1カラットは0.2グラムに相当します。 |
|
3. Q: ダイヤモンドのクオリティーとは何ですか? |
|
A: ダイヤモンドのクオリティーは、ダイヤモンドの純度や透明度を示す指標です。我々は、GIAやAGSの基準に基づいて査定を行います。 |
|
|
|
**Product Search URL:** |
|
https: |
|
|
|
Please let me know if this meets your requirements! 😊 |