gsstec commited on
Commit
024b6de
·
verified ·
1 Parent(s): 50a4792

Upload 4 files

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -95,8 +95,8 @@ def run_diffdock_inference(protein_pdb_content, ligand_smiles_string):
95
  "note": str("RDKit-based drug-likeness scoring (lightweight alternative to DiffDock)")
96
  }
97
 
98
- # Return JSON string to bypass Gradio's JsonData wrapper
99
- return json.dumps(result)
100
 
101
  except Exception as runtime_fault:
102
  # Build error result with explicit JSON-serializable types
@@ -106,8 +106,8 @@ def run_diffdock_inference(protein_pdb_content, ligand_smiles_string):
106
  "diffdock_confidence_score": float(-1.0)
107
  }
108
 
109
- # Return JSON string to bypass Gradio's JsonData wrapper
110
- return json.dumps(result)
111
 
112
  # 🌐 FastAPI app for custom endpoints
113
  app = FastAPI()
 
95
  "note": str("RDKit-based drug-likeness scoring (lightweight alternative to DiffDock)")
96
  }
97
 
98
+ # Return dict directly - Gradio will handle JSON serialization
99
+ return result
100
 
101
  except Exception as runtime_fault:
102
  # Build error result with explicit JSON-serializable types
 
106
  "diffdock_confidence_score": float(-1.0)
107
  }
108
 
109
+ # Return dict directly - Gradio will handle JSON serialization
110
+ return result
111
 
112
  # 🌐 FastAPI app for custom endpoints
113
  app = FastAPI()