eaglelandsonce
commited on
Commit
•
1a4f438
1
Parent(s):
11cbafb
Update app.py
Browse files
app.py
CHANGED
@@ -116,11 +116,13 @@ def generate_audio(prompt):
|
|
116 |
|
117 |
|
118 |
# Function to call Clarifai API
|
119 |
-
def get_image_concepts(
|
120 |
channel = ClarifaiChannel.get_grpc_channel()
|
121 |
-
stub = service_pb2_grpc.V2Stub(
|
122 |
|
123 |
-
|
|
|
|
|
124 |
|
125 |
metadata = (('authorization', 'Key ' + PAT),)
|
126 |
userDataObject = resources_pb2.UserAppIDSet(user_id=USER_ID_OBJECT, app_id=APP_ID_OBJECT)
|
|
|
116 |
|
117 |
|
118 |
# Function to call Clarifai API
|
119 |
+
def get_image_concepts(created_image):
|
120 |
channel = ClarifaiChannel.get_grpc_channel()
|
121 |
+
stub = service_pb2_grpc.V2Stub(pchannel)
|
122 |
|
123 |
+
buffer = BytesIO()
|
124 |
+
created_image.save(buffer, format='PNG')
|
125 |
+
image_bytes = buffer.getvalue()
|
126 |
|
127 |
metadata = (('authorization', 'Key ' + PAT),)
|
128 |
userDataObject = resources_pb2.UserAppIDSet(user_id=USER_ID_OBJECT, app_id=APP_ID_OBJECT)
|