Spanicin commited on
Commit
c19a9dd
·
verified ·
1 Parent(s): 5279dea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -275,7 +275,7 @@ def translate_text(text_prompt, target_language):
275
  def chat_avatar(text_prompt):
276
  response = client.chat.completions.create(
277
  model="gpt-4o-mini",
278
- messages=[{"role": "system", "content": "You are an interactive, conversational and helpful chatbot. Your role is to assist users by providing clear, engaging, and relevant answers using bare minimum words. Your answer doesn't have to be a complete one line. Do not repeat the question in your response. Provide only the answer. Example: For 'What is 1+1?', respond '2'. Regardless of the language used by the user, you should always respond in English."},
279
  {"role": "user", "content": f"Hi! I need help with something. Can you assist me with the following: {text_prompt}"},
280
  ],
281
  max_tokens = len(text_prompt) + 300 # Use the length of the input text
@@ -296,7 +296,7 @@ def generate_video():
296
  try:
297
  if request.method == 'POST':
298
  # source_image = request.files['source_image']
299
- image_path = '/home/user/app/images/screen.jpg'
300
  source_image = Image.open(image_path)
301
  text_prompt = request.form['text_prompt']
302
 
 
275
  def chat_avatar(text_prompt):
276
  response = client.chat.completions.create(
277
  model="gpt-4o-mini",
278
+ messages=[{"role": "system", "content": "Answer using the minimum words you can ever use."},
279
  {"role": "user", "content": f"Hi! I need help with something. Can you assist me with the following: {text_prompt}"},
280
  ],
281
  max_tokens = len(text_prompt) + 300 # Use the length of the input text
 
296
  try:
297
  if request.method == 'POST':
298
  # source_image = request.files['source_image']
299
+ image_path = '/home/user/app/images/vibhu2.jpg'
300
  source_image = Image.open(image_path)
301
  text_prompt = request.form['text_prompt']
302