Fix broken requirements, None lat/lon crash, and HTML escaping - #1
Open
Marchy02 wants to merge 1 commit into
Open
Fix broken requirements, None lat/lon crash, and HTML escaping#1Marchy02 wants to merge 1 commit into
Marchy02 wants to merge 1 commit into
Conversation
Validate Gemini override coords are numeric before folium.Map and guard empty GeoCLIP predictions to avoid crashes that discard results. Remove dead duplicate extract_exif with bare except. Escape untrusted OCR/EXIF/LLM text before HTML injection. Rewrite requirements.txt with real, plausibly-existing pinned ranges covering all actual imports. Fix README entrypoint (app.py) and move implemented YOLO+Gemini out of roadmap; add .env.example with GEMINI_API_KEY. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix da audit sui file della GUI (fork — toccati solo i tuoi file, non l'engine GeoCLIP).
Bug
requirements.txtrotto: versioni inesistenti (torch==2.11.0,gradio==6.10.0, ...) e dipendenze runtime mancanti (google-genai,ultralytics,python-dotenv,geoclip). Riscritto con i pacchetti realmente importati e range di versioni reali; rimosse le dep inutili.None:folium.Map([None,None])faceva crashare scartando tutti gli altri risultati. Ora si valida che siano numeri prima dell'uso, con fallback alla top GeoCLIP.geo_predictions[0]assunto non vuoto → aggiunto guard.extract_exifdefinita due volte (la prima conexcept:nudo, dead code) → rimossa la duplicata.Sicurezza
html.escape()su tutti i testi non fidati (OCR/EXIF/output LLM, popup marker) prima di iniettarli nell'HTML/Folium.Docs
app.py, nongeoclip_gui.py); YOLO+Gemini spostati da roadmap a feature implementate..env.exampleconGEMINI_API_KEY.Verifica
AST OK su tutti i .py; formato
requirements.txtvalidato. App non eseguita (deps pesanti non installate).🤖 Generated with Claude Code