em1tao

f2

Aug 15th, 2021
1,264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.69 KB | None | 0 0
  1. """Accepts original image and tags."""
  2. # -*- coding: utf-8 -*-
  3. from datetime import datetime
  4. from easygui import fileopenbox
  5. import loader
  6.  
  7. print("Choose image file")
  8.  
  9. while True: # picks original image
  10.     screenshot_link = fileopenbox()
  11.     if screenshot_link[-3::] == "png" or screenshot_link[-3::] == "jpg":
  12.         print(f"You choose '{screenshot_link}'")
  13.         break
  14.     print("Choose image file")
  15.  
  16. print("Enter some tags (for example hair color) \nType '.' to stop")
  17. TAGS = []
  18.  
  19. while True:
  20.     tag = input(":")
  21.     if tag == "." and 1 <= len(TAGS) or len(TAGS) > 5:
  22.         break
  23.     TAGS.append(tag)
  24.  
  25.  
  26. TAGS = "+".join(TAGS)
  27. print(loader.main(screenshot_link, TAGS))
  28.  
Advertisement
Add Comment
Please, Sign In to add comment