mirrors / app_config.py
Shim
Add all project files with proper .gitignore for Hugging Face deployment
a67f1bb
raw
history blame contribute delete
865 Bytes
# -*- coding: utf-8 -*-
"""
Configuration file for ΧžΧ¨ΧΧ•Χͺ (Mirrors) Hugging Face Space deployment
"""
# Hugging Face Spaces optimizations
HF_SPACES_CONFIG = {
"model_name": "yam-peleg/Hebrew-Mistral-7B",
"max_new_tokens": 150,
"temperature": 0.7,
"do_sample": True,
"use_fallback": True, # Enable fallback mode for demo
"enable_queue": True, # Enable queuing for better performance
"share": False, # HF Spaces handles sharing automatically
"debug": False
}
# Model loading configuration for HF Spaces
MODEL_CONFIG = {
"torch_dtype": "auto", # Let HF decide the best dtype
"device_map": "auto", # Auto device mapping
"low_cpu_mem_usage": True,
"use_cache": True
}
# UI Configuration
UI_CONFIG = {
"rtl_support": True,
"hebrew_fonts": True,
"max_conversation_length": 50,
"theme": "soft"
}