Spaces:
Running
on
L40S
Running
on
L40S
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,17 @@ import os
|
|
8 |
from utils.gradio_helpers import parse_outputs, process_outputs
|
9 |
|
10 |
# Function to verify the image file type and resize it if necessary
|
11 |
-
def preprocess_image(image_path):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
# Check if the file exists
|
13 |
if not os.path.exists(image_path):
|
14 |
raise FileNotFoundError(f"No such file: '{image_path}'")
|
@@ -202,7 +212,7 @@ with gr.Blocks(css=css) as demo:
|
|
202 |
<div style="display: flex; flex-direction: column;justify-content: center; align-items: center; text-align: center;">
|
203 |
<p style="display: flex;gap: 6px;">
|
204 |
<a href="https://huggingface.co/spaces/fffiloni/expression-editor?duplicate=true">
|
205 |
-
<img src="https://
|
206 |
</a>
|
207 |
</p>
|
208 |
<p>to skip the queue and enjoy faster inference on the GPU of your choice </p>
|
|
|
8 |
from utils.gradio_helpers import parse_outputs, process_outputs
|
9 |
|
10 |
# Function to verify the image file type and resize it if necessary
|
11 |
+
def preprocess_image(image_path):import os
|
12 |
+
script_dir = os.path.dirname(__file__)
|
13 |
+
rel_path = "../images/"
|
14 |
+
abs_file_path = os.path.join(script_dir, rel_path)
|
15 |
+
current_file ="image" + str(X) +".png"
|
16 |
+
file = open(abs_file_path+current_file,'r')import os
|
17 |
+
script_dir = os.path.dirname(__file__)
|
18 |
+
rel_path = "../images/"
|
19 |
+
abs_file_path = os.path.join(script_dir, rel_path)
|
20 |
+
current_file ="image" + str(X) +".png"
|
21 |
+
file = open(abs_file_path+current_file,'r')
|
22 |
# Check if the file exists
|
23 |
if not os.path.exists(image_path):
|
24 |
raise FileNotFoundError(f"No such file: '{image_path}'")
|
|
|
212 |
<div style="display: flex; flex-direction: column;justify-content: center; align-items: center; text-align: center;">
|
213 |
<p style="display: flex;gap: 6px;">
|
214 |
<a href="https://huggingface.co/spaces/fffiloni/expression-editor?duplicate=true">
|
215 |
+
<img src="https://google.com>
|
216 |
</a>
|
217 |
</p>
|
218 |
<p>to skip the queue and enjoy faster inference on the GPU of your choice </p>
|