kpbotla commited on
Commit
fc7a0be
·
verified ·
1 Parent(s): ae1ddb9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -31,14 +31,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
31
  # Summarization pipeline (load once)
32
  summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
33
 
34
- class BasicAgent:
35
- def __init__(self):
36
- print("BasicAgent initialized.")
37
- def __call__(self, question: str) -> str:
38
- print(f"Agent received question (first 50 chars): {question[:50]}...")
39
- fixed_answer = "This is a default answer."
40
- print(f"Agent returning fixed answer: {fixed_answer}")
41
- return fixed_answer
42
 
43
  class SmartResearchAgent:
44
  def __init__(self):
@@ -107,6 +100,7 @@ class SmartResearchAgent:
107
 
108
  try:
109
  # 🔍 Handle image-based chess questions
 
110
  if image is not None:
111
  logging.info("Image input detected")
112
  temp_path = "/tmp/input_image.jpg"
 
31
  # Summarization pipeline (load once)
32
  summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
33
 
34
+
 
 
 
 
 
 
 
35
 
36
  class SmartResearchAgent:
37
  def __init__(self):
 
100
 
101
  try:
102
  # 🔍 Handle image-based chess questions
103
+
104
  if image is not None:
105
  logging.info("Image input detected")
106
  temp_path = "/tmp/input_image.jpg"