Spaces:
Runtime error
Runtime error
# Configuration file for SmoLagent setup | |
""" | |
SmoLagent Configuration Guide | |
============================ | |
To use the AI analysis features, you need to configure a Language Model. | |
SmoLagent supports various models including: | |
1. OpenAI Models (GPT-3.5, GPT-4) | |
2. Local models (Ollama, LMStudio) | |
3. Hugging Face models | |
4. Other API-compatible models | |
Example configurations: | |
# For OpenAI: | |
from smolagents.models import OpenAIServerModel | |
model = OpenAIServerModel( | |
model_id="gpt-4", | |
api_key="your-openai-api-key" | |
) | |
# For local Ollama: | |
from smolagents.models import LiteLLMModel | |
model = LiteLLMModel( | |
model_id="ollama/llama2", | |
api_base="http://localhost:11434" | |
) | |
# For Hugging Face: | |
from smolagents.models import HfApiModel | |
model = HfApiModel( | |
model_id="microsoft/DialoGPT-medium", | |
token="your-hf-token" | |
) | |
Instructions: | |
1. Choose your preferred model from above | |
2. Get the necessary API keys/tokens | |
3. Update the model configuration in app.py | |
4. Replace the placeholder model initialization with your chosen configuration | |
""" | |
# CSV file path configuration | |
CSV_FILE_PATH = "C:/Users/Cosmo/Desktop/NTU Peak Singtel/outsystems_sample_logs_6months.csv" | |
# Model configuration (update with your preferred settings) | |
MODEL_CONFIG = { | |
"provider": "openai", # Change to your preferred provider | |
"model_id": "gpt-4", # Change to your preferred model | |
"api_key": "your-api-key-here", # Add your actual API key | |
"api_base": None, # For local models, set the base URL | |
} | |
# Analysis settings | |
ANALYSIS_SETTINGS = { | |
"max_rows_display": 1000, | |
"plot_style": "seaborn", | |
"figure_size": (12, 8), | |
"dpi": 300, | |
} | |