AlirezaF138 commited on
Commit
ceadd20
·
1 Parent(s): 421d60b

Fix returning values of random generation

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -32,8 +32,12 @@ def generate_texture(*component_values):
32
 
33
  # Function to generate random textures
34
  def random_texture():
 
35
  component_values = np.random.normal(0, 1, n_components)
36
- return reconstruct_texture(component_values), list(component_values)
 
 
 
37
 
38
  # Gradio interface
39
  def create_app():
 
32
 
33
  # Function to generate random textures
34
  def random_texture():
35
+ # Generate random PCA component values
36
  component_values = np.random.normal(0, 1, n_components)
37
+ # Generate the texture from the random PCA values
38
+ generated_image = reconstruct_texture(component_values)
39
+ # Return the image and each component value separately
40
+ return [generated_image] + list(component_values)
41
 
42
  # Gradio interface
43
  def create_app():