From a85d956b5c7d7d532a3004df14a1ae069b89fd99 Mon Sep 17 00:00:00 2001 From: Kye Date: Sat, 11 Nov 2023 20:07:25 -0500 Subject: [PATCH] clean Former-commit-id: 0d0e5e5dc31d262611e2bfd87e6ba52491b6be70 --- playground/models/dall3.py | 8 ++++++++ playground/models/gpt4_v.py | 12 ++++++++++++ playground/models/gpt4vision_example.py | 7 ------- 3 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 playground/models/dall3.py create mode 100644 playground/models/gpt4_v.py delete mode 100644 playground/models/gpt4vision_example.py diff --git a/playground/models/dall3.py b/playground/models/dall3.py new file mode 100644 index 00000000..7a17400d --- /dev/null +++ b/playground/models/dall3.py @@ -0,0 +1,8 @@ +from swarms.models import Dalle3 + +dalle3 = Dalle3( + openai_api_key="" +) +task = "A painting of a dog" +image_url = dalle3(task) +print(image_url) \ No newline at end of file diff --git a/playground/models/gpt4_v.py b/playground/models/gpt4_v.py new file mode 100644 index 00000000..822ec726 --- /dev/null +++ b/playground/models/gpt4_v.py @@ -0,0 +1,12 @@ +from swarms.models.gpt4v import GPT4Vision + + +gpt4vision = GPT4Vision(openai_api_key="") + +img = "https://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/VFPt_Solenoid_correct2.svg/640px-VFPt_Solenoid_correct2.svg.png" + +task = "What is this image" + +answer = gpt4vision.run(task, img) + +print(answer) diff --git a/playground/models/gpt4vision_example.py b/playground/models/gpt4vision_example.py deleted file mode 100644 index 7306fc56..00000000 --- a/playground/models/gpt4vision_example.py +++ /dev/null @@ -1,7 +0,0 @@ -from swarms.models.gpt4v import GPT4Vision - -gpt4vision = GPT4Vision(api_key="") -task = "What is the following image about?" -img = "https://cdn.openai.com/dall-e/encoded/feats/feats_01J9J5ZKJZJY9.png" - -answer = gpt4vision.run(task, img)