demo_app/demo_app.py [913:935]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        fields_output = ""
        try:
            if file is None:
                gr.Warning("Please select or upload a file, then click 'Process File'.")
                raise ValueError(
                    "Please select or upload a file, then click 'Process File'."
                )
            # Get response from the API
            with open(file, "rb") as f:
                payload = {"analyzer_id": analyzer_id}
                file_mime_type = mimetypes.guess_type(file)[0]
                files = {
                    "file": (file, f, file_mime_type),
                    "json": ("payload.json", json.dumps(payload), "application/json"),
                }

                status_code, processing_time_taken, response = send_request(
                    route=analyzer_route,
                    files=files,
                    force_json_content_type=True,
                )
            # Format transcription and field outputs (if available in the response)
            if isinstance(response, dict) and response.get("formatted_fields_md"):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



demo_app/demo_app.py [1074:1096]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        fields_output = ""

        try:
            if file is None:
                gr.Warning("Please select or upload a file, then click 'Process File'.")
                raise ValueError(
                    "Please select or upload a file, then click 'Process File'."
                )
            # Get response from the API
            with open(file, "rb") as f:
                payload = {"analyzer_id": analyzer_id}
                file_mime_type = mimetypes.guess_type(file)[0]
                files = {
                    "file": (file, f, file_mime_type),
                    "json": ("payload.json", json.dumps(payload), "application/json"),
                }

                status_code, processing_time_taken, response = send_request(
                    route=analyzer_route,
                    files=files,
                    force_json_content_type=True,
                )
                if isinstance(response, dict) and response.get("formatted_fields_md"):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



