import streamlit as st from transformers import AutoModelForCausalLM # TO-DD: ??? 부분의 코드를 완성하시오 AutoModelForCausalLM = AutoModelForCausalLM.from_pretrained(task="translation", model="maywell/Synatra-7B-v0.3-Translation", tokenizer="maywell/Synatra-7B-v0.3-Translation") device = "cuda" # the device to load the model onto messages = [ {"role": "user", "content": "바나나는 원래 하얀색이야?"}, ] encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt") model_inputs = encodeds.to(device) model.to(device) generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True) decoded = tokenizer.batch_decode(generated_ids) print(decoded[0])