Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
| 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'
|
| 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")
|