Spaces:
Runtime error
Runtime error
Commit
·
561cfe3
1
Parent(s):
c05c698
Update app.py
Browse files
app.py
CHANGED
@@ -2,13 +2,11 @@ import gradio as gr
|
|
2 |
import requests, json
|
3 |
import os
|
4 |
import io
|
5 |
-
import IPython.display
|
6 |
-
from PIL import Image
|
7 |
-
import base64
|
8 |
|
9 |
|
10 |
-
# Helper functions
|
11 |
-
import requests, json
|
12 |
|
13 |
#Image-to-text endpoint
|
14 |
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"]):
|
@@ -26,9 +24,9 @@ def get_completion(inputs, parameters=None, ENDPOINT_URL="http://internal-aws-pr
|
|
26 |
return json.loads(response.content.decode("utf-8"))
|
27 |
|
28 |
|
29 |
-
image_url = "https://free-images.com/sm/9596/dog_animal_greyhound_983023.jpg"
|
30 |
-
display(IPython.display.Image(url=image_url))
|
31 |
-
get_completion(image_url)
|
32 |
|
33 |
def greet(name):
|
34 |
return "Hello " + name + "!!"
|
|
|
2 |
import requests, json
|
3 |
import os
|
4 |
import io
|
5 |
+
#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"]):
|
|
|
24 |
return json.loads(response.content.decode("utf-8"))
|
25 |
|
26 |
|
27 |
+
#image_url = "https://free-images.com/sm/9596/dog_animal_greyhound_983023.jpg"
|
28 |
+
#display(IPython.display.Image(url=image_url))
|
29 |
+
#get_completion(image_url)
|
30 |
|
31 |
def greet(name):
|
32 |
return "Hello " + name + "!!"
|