File size: 702 Bytes
4494ca7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a7b0517
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os

# Environment-based secrets (for Hugging Face Spaces, set these in "Secrets")
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY", "")
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY", "")
MY_PUBMED_EMAIL = os.getenv("MY_PUBMED_EMAIL", "[email protected]")

# Default LLM models for text
OPENAI_DEFAULT_MODEL = "gpt-4o-mini"    # or "gpt-4" if you have access
GEMINI_DEFAULT_MODEL = "models/chat-bison-001"

# Default Summarization chunk size
DEFAULT_CHUNK_SIZE = 512

# A stable image captioning model recognized by the HF "image-to-text" pipeline
# Example: "nlpconnect/vit-gpt2-image-captioning" or "Salesforce/blip-image-captioning-base"
IMAGE_MODEL_NAME = "Salesforce/blip-image-captioning-base"