ford442 commited on
Commit
40fcec0
·
verified ·
1 Parent(s): 6c52595

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -121,7 +121,10 @@ neg_prompt_2 = " 'non-photorealistic':1.5, 'unrealistic skin','unattractive face
121
  def upload_to_ftp(filename):
122
  try:
123
  transport = paramiko.Transport((FTP_HOST, 22))
124
- destination_path=FTP_DIR+filename
 
 
 
125
  transport.connect(username = FTP_USER, password = FTP_PASS)
126
  sftp = paramiko.SFTPClient.from_transport(transport)
127
  sftp.put(filename, destination_path)
@@ -146,7 +149,7 @@ def save_image(img):
146
  return unique_name
147
 
148
  def uploadNote(prompt,num_inference_steps,guidance_scale,timestamp):
149
- filename= f'txt/tst_B_{timestamp}.txt'
150
  with open(filename, "w") as f:
151
  f.write(f"Realvis 5.0 (Tester B) \n")
152
  f.write(f"Date/time: {timestamp} \n")
 
121
  def upload_to_ftp(filename):
122
  try:
123
  transport = paramiko.Transport((FTP_HOST, 22))
124
+ if filename.endswith(".txt"):
125
+ destination_path=FTP_DIR+'/txt/'filename
126
+ else:
127
+ destination_path=FTP_DIR+filename
128
  transport.connect(username = FTP_USER, password = FTP_PASS)
129
  sftp = paramiko.SFTPClient.from_transport(transport)
130
  sftp.put(filename, destination_path)
 
149
  return unique_name
150
 
151
  def uploadNote(prompt,num_inference_steps,guidance_scale,timestamp):
152
+ filename= f'tst_B_{timestamp}.txt'
153
  with open(filename, "w") as f:
154
  f.write(f"Realvis 5.0 (Tester B) \n")
155
  f.write(f"Date/time: {timestamp} \n")