Spaces:
Sleeping
Sleeping
Update app.py
Browse files2 unmodified lines34567891053 unmodified lines6465666768697022 unmodified lines93949593969798992 unmodified linesDoubles as a portfolio piece (preloaded contract clauses) and a sales tool(paste any documents and search them)."""import spaces # must be imported before torch / CUDA-touching packages
import hashlib
import gradio as gr53 unmodified lines return _cache[key]
@spaces.GPUdef search(documents_text, query, top_k): docs = [d.strip() for d in (documents_text or "").split("\n\n") if d.strip()] if not docs:22 unmodified lines return "\n".join(out)
with gr.Blocks(title="Semantic Document Search", theme=gr.themes.Soft()) as demo:with gr.Blocks(title="Semantic Document Search") as demo: gr.Markdown( """ # 🔍 Semantic Document Searchapp.py+4-1