Spaces:
Sleeping
Sleeping
Commit
·
59052cf
1
Parent(s):
26cbf5d
Update app.py
Browse filesTry #2 at changing the image request headers.
app.py
CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
|
|
2 |
import cv2
|
3 |
import numpy as np
|
4 |
from PIL import Image
|
|
|
5 |
|
6 |
def hex_to_rgb(hex_code):
|
7 |
# Remove the '#' symbol if present
|
@@ -89,7 +90,4 @@ iface = gr.Interface(
|
|
89 |
)
|
90 |
|
91 |
if __name__ == "__main__":
|
92 |
-
|
93 |
-
gr.config.INIT_HTTP_HEADERS["Accept"] = "image/*;q=0.9,image/webp;q=0.8"
|
94 |
-
|
95 |
-
iface.launch()
|
|
|
2 |
import cv2
|
3 |
import numpy as np
|
4 |
from PIL import Image
|
5 |
+
import requests
|
6 |
|
7 |
def hex_to_rgb(hex_code):
|
8 |
# Remove the '#' symbol if present
|
|
|
90 |
)
|
91 |
|
92 |
if __name__ == "__main__":
|
93 |
+
iface.launch()
|
|
|
|
|
|