Spaces:
Sleeping
Sleeping
Update app.py
Browse files4 unmodified lines56788910115 unmodified lines17181920212021222324211 unmodified lines2362372382392392402412424 unmodified linesimport inspectimport pandas as pdimport toolsfrom smolagents import CodeAgent, HfApiModelfrom smolagents import CodeAgent, ApiModelfrom typing import TypedDict, List, Dict, Any, Optionalfrom langgraph.graph import StateGraph, START, ENDfrom langgraph.messages import HumanMessage5 unmodified lines
# --- Models ---# Vision model for image analysis / OCRvision_model = HfApiModel(repo_id="FireRedTeam/FireRed-OCR", max_new_tokens=2048, temperature=0.3)math_model = HfApiModel(repo_id="Qwen/Qwen2.5-Math-1.5B", max_new_tokens=2048, temperature=0.3)vision_model = ApiModel(repo_id="FireRedTeam/FireRed-OCR", max_new_tokens=2048, temperature=0.3)math_model = ApiModel(repo_id="Qwen/Qwen2.5-Math-1.5B", max_new_tokens=2048, temperature=0.3)
#define the stateclass AgentState(TypedDict):211 unmodified lines""" messages = [HumanMessage(content=prompt)] # Use the general model for final answer synthesis general_model = HfApiModel(repo_id="Qwen3.5-35B-A3B", max_new_tokens=2048, temperature=0.3) general_model = ApiModel(repo_id="Qwen3.5-35B-A3B", max_new_tokens=2048, temperature=0.3) response = general_model.invoke(messages) raw_response = response.content if hasattr(response, 'content') else str(response)
app.py+4-4