Spaces:
Runtime error
Runtime error
muhammadzain
commited on
Commit
•
7888e9b
1
Parent(s):
1858b2b
Update app.py
Browse files
app.py
CHANGED
@@ -36,14 +36,14 @@ else:
|
|
36 |
print("Done!")
|
37 |
|
38 |
|
39 |
-
|
40 |
def loadModel(n):
|
41 |
super_res = cv2.dnn_superres.DnnSuperResImpl_create()
|
42 |
super_res.readModel('models/ESPCN_x'+n+'.pb')
|
43 |
return super_res
|
44 |
|
45 |
# on removing (show_spinner=False), it will show that fuction is running on web app
|
46 |
-
@st.
|
47 |
def upscale(file,task,_progressBar = None):
|
48 |
with open(file.name, "wb") as f:
|
49 |
f.write(file.getbuffer())
|
|
|
36 |
print("Done!")
|
37 |
|
38 |
|
39 |
+
|
40 |
def loadModel(n):
|
41 |
super_res = cv2.dnn_superres.DnnSuperResImpl_create()
|
42 |
super_res.readModel('models/ESPCN_x'+n+'.pb')
|
43 |
return super_res
|
44 |
|
45 |
# on removing (show_spinner=False), it will show that fuction is running on web app
|
46 |
+
@st.experimental_memo(show_spinner=False)
|
47 |
def upscale(file,task,_progressBar = None):
|
48 |
with open(file.name, "wb") as f:
|
49 |
f.write(file.getbuffer())
|