from transformers import AutoModel, AutoTokenizer model_name = "usamasansi/carsell_model" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModel.from_pretrained(model_name) # Streamlit UI st.title("Car Selling Chatbot") user_input = st.text_input("You: ", "") if st.button("Send"): if user_input: # Tokenize user input and generate response inputs = tokenizer(user_input, return_tensors="pt") outputs = model.generate(**inputs, max_new_tokens=128) response = tokenizer.decode(outputs[0], skip_special_tokens=True) st.text(f"Bot: {response}") else: st.text("Please enter a message.")