drakosfire commited on
Commit
b516f91
1 Parent(s): b37c702

it's a permissions problem

Browse files
Files changed (2) hide show
  1. app.py +1 -0
  2. card_generator.py +2 -0
app.py CHANGED
@@ -299,6 +299,7 @@ with gr.Blocks() as demo:
299
  ],
300
  outputs = generate_gallery )
301
  base_dir = os.path.dirname(os.path.abspath(__file__)) # Gets the directory where the script is located
 
302
  list_of_static_dir = [os.path.join(base_dir, "card_parts"),
303
  os.path.join(base_dir, "fonts"),
304
  os.path.join(base_dir, "image_temp")]
 
299
  ],
300
  outputs = generate_gallery )
301
  base_dir = os.path.dirname(os.path.abspath(__file__)) # Gets the directory where the script is located
302
+ print(f"Base Directory :",base_dir)
303
  list_of_static_dir = [os.path.join(base_dir, "card_parts"),
304
  os.path.join(base_dir, "fonts"),
305
  os.path.join(base_dir, "image_temp")]
card_generator.py CHANGED
@@ -18,6 +18,8 @@ blank_overlay_path = "./card_parts/white-fill-title-detail-value-transparent.png
18
  value_overlay_path = "./card_parts/Value_box_transparent.png"
19
  test_item = {'Name': 'Pustulent Raspberry', 'Type': 'Fruit', 'Value': '1 cp', 'Properties': ['Unusual Appearance', 'Rare Taste'], 'Weight': '0.2 lb', 'Description': 'This small fruit has a pustulent appearance, with bumps and irregular shapes covering its surface. Its vibrant colors and strange texture make it an oddity among other fruits.', 'Quote': 'A fruit that defies expectations, as sweet and sour as life itself.', 'SD Prompt': 'A small fruit with vibrant colors and irregular shapes, bumps covering its surface.'}
20
 
 
 
21
 
22
 
23
  # Function that takes in an image url and a dictionary and uses the values to print onto a card.
 
18
  value_overlay_path = "./card_parts/Value_box_transparent.png"
19
  test_item = {'Name': 'Pustulent Raspberry', 'Type': 'Fruit', 'Value': '1 cp', 'Properties': ['Unusual Appearance', 'Rare Taste'], 'Weight': '0.2 lb', 'Description': 'This small fruit has a pustulent appearance, with bumps and irregular shapes covering its surface. Its vibrant colors and strange texture make it an oddity among other fruits.', 'Quote': 'A fruit that defies expectations, as sweet and sour as life itself.', 'SD Prompt': 'A small fruit with vibrant colors and irregular shapes, bumps covering its surface.'}
20
 
21
+ import os
22
+ print(f"path to value box transparent{os.path.exists('/home/user/app/card_parts/Value_box_transparent.png')}") # Should return True
23
 
24
 
25
  # Function that takes in an image url and a dictionary and uses the values to print onto a card.