fix
Browse filesFiles changed (2)
5 unmodified lines678910115 unmodified linesimport gradio as grfrom typing import Dict, Optionalfrom huggingface_hub import HfApifrom .config import (AVAILABLE_MODELS, DEFAULT_MODEL, DEFAULT_MODEL_NAME,5 unmodified lines678910111213141516171819202122232425262728295 unmodified linesimport gradio as grfrom typing import Dict, Optionalfrom huggingface_hub import HfApiimport httpx# Monkey-patch httpx to increase timeout for OAuth# This prevents ReadTimeout errors during HuggingFace OAuth flow_original_client_init = httpx.AsyncClient.__init__def _patched_client_init(self, *args, **kwargs):# If no timeout is specified, use longer timeoutsif 'timeout' not in kwargs:kwargs['timeout'] = httpx.Timeout(connect=30.0, # 30 seconds for connectionread=60.0, # 60 seconds for reading response (increased from default 5s)write=30.0, # 30 seconds for writingpool=30.0 # 30 seconds for pool operations)return _original_client_init(self, *args, **kwargs)httpx.AsyncClient.__init__ = _patched_client_initfrom .config import (AVAILABLE_MODELS, DEFAULT_MODEL, DEFAULT_MODEL_NAME,
12345git+https://github.com/huggingface/huggingface_hub.gitgradio[oauth]PyPDF2python-docxpytesseract1234567git+https://github.com/huggingface/huggingface_hub.gitgradio[oauth]fastapi==0.112.2httpx>=0.27.0PyPDF2python-docxpytesseract
anycoder_app/ui.py+18
requirements.txt+2