kevin1kevin1k commited on
Commit
e2b055d
·
verified ·
1 Parent(s): e7247e4

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. image_to_text.py +2 -2
image_to_text.py CHANGED
@@ -124,7 +124,7 @@ class LlamaEvaluator(ImageEvaluator):
124
  else:
125
  # Fallback prompt
126
  return "A beautiful image with vibrant colors and detailed composition"
127
-
128
  def analyze_differences(self, generated_img: Image.Image, target_img: Image.Image) -> Dict[str, Any]:
129
  """Analyze differences between generated and target images."""
130
  analysis_prompt = """
@@ -185,7 +185,7 @@ class LlamaEvaluator(ImageEvaluator):
185
  "raw_analysis": response_text,
186
  "note": "JSON parsing failed, using fallback analysis"
187
  }
188
-
189
  def describe_image(self, image: Image.Image, custom_prompt: str = None) -> str:
190
  """Generate a detailed description of an image."""
191
  if not custom_prompt:
 
124
  else:
125
  # Fallback prompt
126
  return "A beautiful image with vibrant colors and detailed composition"
127
+ @weave.op()
128
  def analyze_differences(self, generated_img: Image.Image, target_img: Image.Image) -> Dict[str, Any]:
129
  """Analyze differences between generated and target images."""
130
  analysis_prompt = """
 
185
  "raw_analysis": response_text,
186
  "note": "JSON parsing failed, using fallback analysis"
187
  }
188
+ @weave.op()
189
  def describe_image(self, image: Image.Image, custom_prompt: str = None) -> str:
190
  """Generate a detailed description of an image."""
191
  if not custom_prompt: