abdulsamad commited on
Commit
07b2fc3
·
1 Parent(s): 26e5d5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,7 +6,7 @@ import IPython.display
6
  from PIL import Image
7
  import base64
8
 
9
-
10
 
11
  #Image-to-text endpoint
12
  def get_completion(inputs, parameters=None, ENDPOINT_URL="http://internal-aws-prod-internal-revproxy-alb-11660607.us-west-1.elb.amazonaws.com/rev-proxy/huggingface/itt"):
@@ -23,8 +23,8 @@ def get_completion(inputs, parameters=None, ENDPOINT_URL="http://internal-aws-pr
23
  data=json.dumps(data))
24
  return json.loads(response.content.decode("utf-8"))
25
 
26
- image_url = "https://free-images.com/sm/9596/dog_animal_greyhound_983023.jpg"
27
- demo = gr.Textbox(get_completion(image_url))
28
 
29
  def image_to_base64_str(pil_image):
30
  byte_arr = io.BytesIO()
 
6
  from PIL import Image
7
  import base64
8
 
9
+ demo = gr.Textbox(get_completion(os.environ['HF_TOKENS']))
10
 
11
  #Image-to-text endpoint
12
  def get_completion(inputs, parameters=None, ENDPOINT_URL="http://internal-aws-prod-internal-revproxy-alb-11660607.us-west-1.elb.amazonaws.com/rev-proxy/huggingface/itt"):
 
23
  data=json.dumps(data))
24
  return json.loads(response.content.decode("utf-8"))
25
 
26
+ #image_url = "https://free-images.com/sm/9596/dog_animal_greyhound_983023.jpg"
27
+ #demo = gr.Textbox(get_completion(image_url))
28
 
29
  def image_to_base64_str(pil_image):
30
  byte_arr = io.BytesIO()