Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
-
import os
|
2 |
-
import sys
|
3 |
-
import argparse
|
4 |
-
import time
|
5 |
-
from pathlib import Path
|
6 |
-
import pandas as pd
|
7 |
|
8 |
import gradio as gr
|
9 |
-
import cv2
|
10 |
from PIL import Image
|
11 |
-
import torch
|
12 |
-
import torch.backends.cudnn as cudnn
|
13 |
-
from numpy import random
|
14 |
import numpy as np
|
15 |
|
16 |
# BASE_DIR = "/home/user/app"
|
@@ -212,9 +212,10 @@ def get_output(image):
|
|
212 |
# if os.path.exists(output_path):
|
213 |
# return np.array(Image.open(output_path))
|
214 |
# else:
|
215 |
-
return
|
216 |
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
|
|
|
1 |
+
# import os
|
2 |
+
# import sys
|
3 |
+
# import argparse
|
4 |
+
# import time
|
5 |
+
# from pathlib import Path
|
6 |
+
# import pandas as pd
|
7 |
|
8 |
import gradio as gr
|
9 |
+
# import cv2
|
10 |
from PIL import Image
|
11 |
+
# import torch
|
12 |
+
# import torch.backends.cudnn as cudnn
|
13 |
+
# from numpy import random
|
14 |
import numpy as np
|
15 |
|
16 |
# BASE_DIR = "/home/user/app"
|
|
|
212 |
# if os.path.exists(output_path):
|
213 |
# return np.array(Image.open(output_path))
|
214 |
# else:
|
215 |
+
return image
|
216 |
|
217 |
+
def main():
|
218 |
+
gr.Interface(fn=get_output,
|
219 |
+
inputs=gr.Image(type = "pil", label="Your image"),
|
220 |
+
outputs="image"
|
221 |
+
).launch(debug=True)
|