Spaces:
Runtime error
Runtime error
File size: 1,652 Bytes
5269c7e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# 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,
}
|