Tonic commited on
Commit
aa09b5b
·
1 Parent(s): 6f3bbe5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -166,9 +166,9 @@ def save_image(image_input, output_dir="saved_images"):
166
  raise ValueError("Invalid image input type")
167
 
168
  def process_image(image_file_path):
169
- client = Client("https://tonic1-official-qwen-vl-chat.hf.space/--replicas/t5ccx/") # TruEra
170
  try:
171
- result = client.predict(
172
  "Describe this image in detail, identify every detail in this image. Describe the image the best you can.", # TruEra
173
  image_file_path,
174
  fn_index=0
@@ -176,6 +176,7 @@ def process_image(image_file_path):
176
  return result
177
  except Exception as e:
178
  return f"Error occurred during image processing: {e}"
 
179
  def process_speech(audio_input, source_language, target_language="English"):
180
 
181
  if audio_input is None:
 
166
  raise ValueError("Invalid image input type")
167
 
168
  def process_image(image_file_path):
169
+ client = Client("https://tonic1-official-qwen-vl-chat.hf.space/--replicas/t5ccx/") # TruEra
170
  try:
171
+ result = client.predict(
172
  "Describe this image in detail, identify every detail in this image. Describe the image the best you can.", # TruEra
173
  image_file_path,
174
  fn_index=0
 
176
  return result
177
  except Exception as e:
178
  return f"Error occurred during image processing: {e}"
179
+
180
  def process_speech(audio_input, source_language, target_language="English"):
181
 
182
  if audio_input is None: