salomonsky commited on
Commit
ee8fb83
1 Parent(s): c1abc2b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -99,11 +99,11 @@ async def improve_prompt(prompt):
99
  return f"Error mejorando el prompt: {e}"
100
 
101
  def get_storage():
102
- files = [{"name": str(file.resolve()), "size": file.stat().st_size,}
103
- for file in DATA_PATH.glob("*.jpg")
104
- if file.is_file()]
105
  usage = sum([f['size'] for f in files])
106
- return [file["name"] for f in files], f"Uso total: {usage/(1024.0 ** 3):.3f}GB"
107
 
108
  def get_prompts():
109
  prompt_files = [file for file in DATA_PATH.glob("*.txt") if file.is_file()]
@@ -187,4 +187,4 @@ for idx, file in enumerate(files):
187
  if st.button(f"Borrar Imagen {idx+1}", key=f"delete_{idx}"):
188
  os.remove(file)
189
  if prompt_file:
190
- os.remove(prompt_file)
 
99
  return f"Error mejorando el prompt: {e}"
100
 
101
  def get_storage():
102
+ files = [{"name": str(file.resolve()), "size": file.stat().st_size}
103
+ for file in DATA_PATH.glob("*.jpg") if file.is_file()]
104
+
105
  usage = sum([f['size'] for f in files])
106
+ return [f["name"] for f in files], f"Uso total: {usage/(1024.0 ** 3):.3f}GB"
107
 
108
  def get_prompts():
109
  prompt_files = [file for file in DATA_PATH.glob("*.txt") if file.is_file()]
 
187
  if st.button(f"Borrar Imagen {idx+1}", key=f"delete_{idx}"):
188
  os.remove(file)
189
  if prompt_file:
190
+ os.remove(prompt_file)