Spaces:
Runtime error
Runtime error
Commit
·
e09159b
1
Parent(s):
9b8b6ba
Upload 2 files
Browse files- app.py +1 -9
- requirements.txt +0 -0
app.py
CHANGED
@@ -1,12 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
-
import cv2
|
3 |
-
from flask import Flask,request,render_template
|
4 |
import tensorflow as tf
|
5 |
from PIL import Image
|
6 |
from tensorflow.keras.applications import vgg19
|
7 |
|
8 |
from tensorflow.python.keras import models
|
9 |
-
import IPython.display
|
10 |
import numpy as np
|
11 |
from tensorflow import keras
|
12 |
from werkzeug.utils import secure_filename
|
@@ -170,12 +167,7 @@ def run_style_transfer(content_path,style_path,epochs=20,content_weight=1e3, sty
|
|
170 |
plot_img = noise.numpy()
|
171 |
plot_img = deprocess_img(plot_img)
|
172 |
imgs.append(plot_img)
|
173 |
-
|
174 |
-
IPython.display.display_png(Image.fromarray(plot_img))
|
175 |
-
|
176 |
-
|
177 |
-
IPython.display.clear_output(wait=True)
|
178 |
-
|
179 |
|
180 |
return best_img,best_loss,imgs
|
181 |
|
|
|
1 |
import gradio as gr
|
|
|
|
|
2 |
import tensorflow as tf
|
3 |
from PIL import Image
|
4 |
from tensorflow.keras.applications import vgg19
|
5 |
|
6 |
from tensorflow.python.keras import models
|
|
|
7 |
import numpy as np
|
8 |
from tensorflow import keras
|
9 |
from werkzeug.utils import secure_filename
|
|
|
167 |
plot_img = noise.numpy()
|
168 |
plot_img = deprocess_img(plot_img)
|
169 |
imgs.append(plot_img)
|
170 |
+
|
|
|
|
|
|
|
|
|
|
|
171 |
|
172 |
return best_img,best_loss,imgs
|
173 |
|
requirements.txt
CHANGED
Binary files a/requirements.txt and b/requirements.txt differ
|
|