jsup.GEN - working on image-to-image generation with AI

Image
by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/jsup-gen-working-on-image-to-image-generation-with-ai Hello, this is @joviansummer(witness: @jswit). I'd like to share what I'm working on regarding my experintal jsup.GEN project, which tries to connect image generation AI with Steemit. Currently, jsup.GEN provide function to generate image from test prompt(txt2img). This function is interesting, but it's not easy to generate exactly what you want because you need to explain the image in detail with multiple keywords in English. Thus, I think it's more useful to have a function to generate image from existing reference image. I'm working on this image-to-image function, and thinking about two methods to implement it. The first method is to provide 2 commands as follows: !gen_t : This command focuses more on text prompt than reference image. The result may be quite different from reference because text prompt will have much more in...

파이썬에서 예외(exception) 처리

by joviansummer
original STEEMIT post: https://steemit.com/blog/@joviansummer/exception


파이썬에서의 예외(exception) 처리 예시입니다. try와 except 구문을 사용합니다.

예를 들어 어떤 수를 0으로 나누려 할 경우 예외가 발생할 것입니다.

try:
  x = 100/0
except:
  print("예외가 발생했습니다.")

위의 코드를 실행하면 "예외가 발생했습니다."라는 문자열이 출력될 것입니다.

어떤 예외가 발생했는지 출력하고 싶다면 아래와 같이 할 수 있습니다.

try:
  x = 100/0
except Exception as e:
  exc_str = str(e)
  print(exc_str)

위의 코드를 실행하면 예외 발생 메시지 "division by zero"가 출력될 것입니다.

Comments

Popular posts from this blog

스티미언의 영향력 지수 계산

jsup/avle code update - you don't have to write post everyday

jsup/avle 보팅 코드 갱신 - 1일1포스팅 강박에서 벗어나기