tidalove commited on
Commit
bbbd3d2
·
verified ·
1 Parent(s): a62af7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  import os
3
  import tempfile
4
  import zipfile
5
- from your_adain_module import run_adain # Your actual AdaIN implementation
6
 
7
  def process_adain_api(files, style_strength=1.0):
8
  '''API endpoint for AdaIN processing.'''
@@ -23,11 +23,10 @@ def process_adain_api(files, style_strength=1.0):
23
  shutil.copy(file.name, input_dir)
24
 
25
  try:
26
- # Your internal style images path
27
- style_images_path = "path/to/your/style/images"
28
 
29
  # Run AdaIN
30
- result_path = run_adain(input_dir, style_images_path, output_dir, style_strength)
31
 
32
  # Create zip file
33
  zip_path = os.path.join(temp_dir, "style_transfer_results.zip")
 
2
  import os
3
  import tempfile
4
  import zipfile
5
+ from test_api import run_adain
6
 
7
  def process_adain_api(files, style_strength=1.0):
8
  '''API endpoint for AdaIN processing.'''
 
23
  shutil.copy(file.name, input_dir)
24
 
25
  try:
26
+ style_dataset_pth = "tidalove/paleo-real"
 
27
 
28
  # Run AdaIN
29
+ result_path = run_adain(input_dir, style_dataset_pth, output_dir, style_strength)
30
 
31
  # Create zip file
32
  zip_path = os.path.join(temp_dir, "style_transfer_results.zip")