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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -103,8 +103,8 @@ 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):
@@ -115,7 +115,4 @@ def chat_function(message, history):
115
 
116
  # Create Gradio Chat Interface
117
  chat_interface = gr.ChatInterface(chat_function)
118
- chat_interface.launch(share=True) # Added share=True to create a public link
119
-
120
-
121
-
 
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):
 
115
 
116
  # Create Gradio Chat Interface
117
  chat_interface = gr.ChatInterface(chat_function)
118
+ chat_interface.launch(share=True)