eaglelandsonce commited on
Commit
a11c8b8
·
verified ·
1 Parent(s): 417dec9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -5,18 +5,21 @@ from clarifai_grpc.grpc.api import resources_pb2, service_pb2, service_pb2_grpc
5
  from clarifai_grpc.grpc.api.status import status_code_pb2
6
  import io
7
 
 
 
 
 
 
 
 
 
 
8
  # Function to call Clarifai API
9
  def get_image_concepts(image_bytes):
10
  channel = ClarifaiChannel.get_grpc_channel()
11
  stub = service_pb2_grpc.V2Stub(channel)
12
 
13
- PAT = os.getenv('CLARIFAI_PAT')
14
-
15
- # Renamed variables
16
- USER_ID_OBJECT = 'clarifai'
17
- APP_ID_OBJECT = 'main'
18
- MODEL_ID_OBJECT = 'general-image-detection'
19
- MODEL_VERSION_ID_OBJECT = '1580bb1932594c93b7e2e04456af7c6f'
20
 
21
  metadata = (('authorization', 'Key ' + PAT),)
22
  userDataObject = resources_pb2.UserAppIDSet(user_id=USER_ID_OBJECT, app_id=APP_ID_OBJECT)
 
5
  from clarifai_grpc.grpc.api.status import status_code_pb2
6
  import io
7
 
8
+
9
+ PAT = os.getenv('CLARIFAI_PAT')
10
+
11
+ # Renamed variables
12
+ USER_ID_OBJECT = 'clarifai'
13
+ APP_ID_OBJECT = 'main'
14
+ MODEL_ID_OBJECT = 'general-image-detection'
15
+ MODEL_VERSION_ID_OBJECT = '1580bb1932594c93b7e2e04456af7c6f'
16
+
17
  # Function to call Clarifai API
18
  def get_image_concepts(image_bytes):
19
  channel = ClarifaiChannel.get_grpc_channel()
20
  stub = service_pb2_grpc.V2Stub(channel)
21
 
22
+
 
 
 
 
 
 
23
 
24
  metadata = (('authorization', 'Key ' + PAT),)
25
  userDataObject = resources_pb2.UserAppIDSet(user_id=USER_ID_OBJECT, app_id=APP_ID_OBJECT)