Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
•
ba1f1ff
1
Parent(s):
5e2af96
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,9 @@ import os
|
|
4 |
os.system("pip install gdown")
|
5 |
os.system("gdown https://drive.google.com/uc?id=1riNxV1BWMAXfmWZ3LrQbEkvzV8f7lOCp")
|
6 |
|
7 |
-
|
|
|
|
|
8 |
|
9 |
input_name = onnx_session.get_inputs()[0].name
|
10 |
output_name = onnx_session.get_outputs()[0].name
|
|
|
4 |
os.system("pip install gdown")
|
5 |
os.system("gdown https://drive.google.com/uc?id=1riNxV1BWMAXfmWZ3LrQbEkvzV8f7lOCp")
|
6 |
|
7 |
+
opts = onnxruntime.SessionOptions()
|
8 |
+
opts.intra_op_num_threads = 4
|
9 |
+
onnx_session = onnxruntime.InferenceSession("/home/user/app/face_paint_512_v2_0.onnx",sess_options=opts)
|
10 |
|
11 |
input_name = onnx_session.get_inputs()[0].name
|
12 |
output_name = onnx_session.get_outputs()[0].name
|