ctn8176 commited on
Commit
1592e82
·
verified ·
1 Parent(s): 0cdb0a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -103,8 +103,11 @@ def generate_response(prompt):
103
 
104
  generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
105
 
106
- return (f"Movie Info:\n{movie_info['title']}, {movie_info['year']}, {movie_info['genre']}\n\n" \
107
- f"Generated Response:\n{generated_text}", image_url)
 
 
 
108
 
109
  # Define chat function for gr.ChatInterface
110
  def chat_function(message, history):
 
103
 
104
  generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
105
 
106
+ return (
107
+ f"Movie Info: {movie_info['title']}, {movie_info['year']}, {movie_info['genre']}\n\n" \
108
+ f"Generated Response: {generated_text[:100]}", # Truncate to 100 characters
109
+ image_url
110
+ )
111
 
112
  # Define chat function for gr.ChatInterface
113
  def chat_function(message, history):