전체 글
-
승무지시서 좌표값읽어오기카테고리 없음 2023. 4. 18. 16:16
import io import os import re from google.cloud import vision_v1 from google.cloud.vision_v1 import types def detect_text(path, target_strings): client = vision_v1.ImageAnnotatorClient() with io.open(path, 'rb') as image_file: content = image_file.read() image = types.Image(content=content) # Vision API를 사용하여 이미지에서 텍스트 감지 response = client.text_detection(image=image) # 감지된 문자 리스트로 변환 texts = res..
-
flask서버를 이용한 안드로이드앱 전송카테고리 없음 2023. 4. 3. 19:54
import flask app = flask.Flask(__name__) @app.route('/', methods=['GET', 'POST']) def handle_request(): postBody = flask.request.get_data() postBodyStr = postBody.decode('utf-8') print("Post Body:", postBodyStr) return "Flask Server & Android are Working Successfully" if __name__ == '__main__': app.run(host="192.168.168.163", port=5000, debug=True) implementation 'com.squareup.okhttp3:okhttp:3.4..
-
chatGPT 테스트 php 코드카테고리 없음 2023. 3. 12. 20:14
"gpt-3.5-turbo", "messages" => array( array( "role" => "user", "content" => $prompt ) ), "max_tokens" => 3000, "temperature" => 0.5,);$data_string = json_encode($data);$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch, CURLOPT_POSTFIELDS, $data_s..
-
chatGPT 테스트 python 코드카테고리 없음 2023. 3. 12. 15:17
https://platform.openai.com/ OpenAI API An API for accessing new AI models developed by OpenAI platform.openai.com 가입하여 key를 발급 받는다. 그런데, 테스트는 할수 있고, 사용하려면 돈 내야 한다. import openai # Setting API key # You can obtain your key via # https://platform.openai.com/account/api-keys openai.api_key = "" # ChatGPT Context context = {"role": "system", "content": "Hello World!"} messages = [context] # Colors ..