Spaces:
Running
Running
Update PolyAgent/gradio_interface.py
Browse files
PolyAgent/gradio_interface.py
CHANGED
|
@@ -651,7 +651,7 @@ def _maybe_add_artifacts(
|
|
| 651 |
imgs: List[str] = []
|
| 652 |
extras: Dict[str, Any] = {}
|
| 653 |
|
| 654 |
-
# Generation grid
|
| 655 |
try:
|
| 656 |
gen = (report.get("summary", {}) or {}).get("generation", {})
|
| 657 |
if isinstance(gen, dict) and gen.get("generated_psmiles"):
|
|
@@ -950,7 +950,7 @@ def run_agent(state: Dict[str, Any], questions: str) -> Tuple[str, List[str]]:
|
|
| 950 |
|
| 951 |
target_value: Optional[float] = float(inferred_target) if inferred_target is not None else None
|
| 952 |
|
| 953 |
-
# Literature query
|
| 954 |
literature_query_default = DEFAULT_LITERATURE_QUERY
|
| 955 |
case_brief = DEFAULT_CASE_BRIEF
|
| 956 |
property_name = inferred_prop
|
|
@@ -1011,7 +1011,7 @@ def run_agent(state: Dict[str, Any], questions: str) -> Tuple[str, List[str]]:
|
|
| 1011 |
if not isinstance(report, dict):
|
| 1012 |
report = {"summary": {"report_generation": {"text": str(report)}}}
|
| 1013 |
|
| 1014 |
-
# Attach domains/citations
|
| 1015 |
report = _attach_source_domains(report)
|
| 1016 |
report = _index_citable_sources(report)
|
| 1017 |
|
|
|
|
| 651 |
imgs: List[str] = []
|
| 652 |
extras: Dict[str, Any] = {}
|
| 653 |
|
| 654 |
+
# Generation grid
|
| 655 |
try:
|
| 656 |
gen = (report.get("summary", {}) or {}).get("generation", {})
|
| 657 |
if isinstance(gen, dict) and gen.get("generated_psmiles"):
|
|
|
|
| 950 |
|
| 951 |
target_value: Optional[float] = float(inferred_target) if inferred_target is not None else None
|
| 952 |
|
| 953 |
+
# Literature query
|
| 954 |
literature_query_default = DEFAULT_LITERATURE_QUERY
|
| 955 |
case_brief = DEFAULT_CASE_BRIEF
|
| 956 |
property_name = inferred_prop
|
|
|
|
| 1011 |
if not isinstance(report, dict):
|
| 1012 |
report = {"summary": {"report_generation": {"text": str(report)}}}
|
| 1013 |
|
| 1014 |
+
# Attach domains/citations
|
| 1015 |
report = _attach_source_domains(report)
|
| 1016 |
report = _index_citable_sources(report)
|
| 1017 |
|