Spaces:
Sleeping
Sleeping
Update app.py
Browse files14 unmodified lines1516171819202122232414 unmodified linesst.title("Simple Chatbot with T5")def generate_response(input_text):# Prepare the input (as T5 expects a task-based prompt, we'll just prefix with 'translate English to English' for simplicity)input_text = f"conversation: {input_text}"# Tokenize input textinput_ids = tokenizer.encode(input_text, return_tensors="pt").to(device)# Generate a response from the model14 unmodified lines1516171819202114 unmodified linesst.title("Simple Chatbot with T5")def generate_response(input_text):# Tokenize the user input textinput_ids = tokenizer.encode(input_text, return_tensors="pt").to(device)# Generate a response from the model
app.py+1-4