hertogateis commited on
Commit
6ebe6af
·
verified ·
1 Parent(s): 004ce70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -15,10 +15,7 @@ model.to(device)
15
  st.title("Simple Chatbot with T5")
16
 
17
  def generate_response(input_text):
18
- # Prepare the input (as T5 expects a task-based prompt, we'll just prefix with 'translate English to English' for simplicity)
19
- input_text = f"conversation: {input_text}"
20
-
21
- # Tokenize input text
22
  input_ids = tokenizer.encode(input_text, return_tensors="pt").to(device)
23
 
24
  # Generate a response from the model
 
15
  st.title("Simple Chatbot with T5")
16
 
17
  def generate_response(input_text):
18
+ # Tokenize the user input text
 
 
 
19
  input_ids = tokenizer.encode(input_text, return_tensors="pt").to(device)
20
 
21
  # Generate a response from the model