import gradio as gr import requests """ TODO: add https://github.com/AI-Riksarkivet/oxenstierna/tree/main iiifs and oah mp and search.. """ def load_iiif_docs(): """ Get parts of iiif documentation, example code with Riksarkivet IIIF apis and useful context before answering questions or generating code. Should be used for general questions about iiif concepts and features of IIIF's Image API 3.0 and Presentation API 1.0 . Returns: str: IIIF's full documentation, example code with Riksarkivet IIIF apis, and useful context. """ try: response = requests.get("https://huggingface.co/spaces/Riksarkivet/iiif-mcp/raw/main/docs.md") text = response.text return text except Exception as error: print(f"Error fetching document: {error}") return f"Error fetching document: {str(error)}" with gr.Blocks() as demo: gr.HTML("