StevenChen16 commited on
Commit
8f373e3
·
verified ·
1 Parent(s): d4a21d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import gradio as gr
2
  from train import main
3
  import spaces
4
- import torch
5
  import tensorflow as tf
6
 
7
 
@@ -40,9 +39,8 @@ def handle_image_size_selection(img_size, content_img):
40
  def process_images(content_img, style_img, epochs, steps_per_epoch, learning_rate, content_loss_factor, style_loss_factor, img_size, img_width, img_height):
41
  print("Start processing")
42
  print(tf.config.list_physical_devices('GPU'))
43
- print(torch.cuda.get_device_name(0))
44
- with tf.device("/physical_device:GPU:0"):
45
- output_img = main(content_img, style_img, epochs, steps_per_epoch, learning_rate, content_loss_factor, style_loss_factor, img_size, img_width, img_height)
46
  return output_img
47
 
48
  # @spaces.GPU
 
1
  import gradio as gr
2
  from train import main
3
  import spaces
 
4
  import tensorflow as tf
5
 
6
 
 
39
  def process_images(content_img, style_img, epochs, steps_per_epoch, learning_rate, content_loss_factor, style_loss_factor, img_size, img_width, img_height):
40
  print("Start processing")
41
  print(tf.config.list_physical_devices('GPU'))
42
+ # with tf.device("/physical_device:GPU:0"):
43
+ output_img = main(content_img, style_img, epochs, steps_per_epoch, learning_rate, content_loss_factor, style_loss_factor, img_size, img_width, img_height)
 
44
  return output_img
45
 
46
  # @spaces.GPU