Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions codecarbon/viz/carbonboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,10 @@ def update_cloud_emissions_barchart(hidden_project_summary: dcc.Store):
return app


def viz(filepath: str, port: int = 8050, debug: bool = False) -> None:
def viz(filepath: str, port: int = 8050, debug: bool = False, host=None) -> None:
df = pd.read_csv(filepath)
app = render_app(df)
app.run(port=port, debug=debug)
app.run(port=port, debug=debug, host=host)


def main():
Expand Down
1 change: 1 addition & 0 deletions docs/how-to/visualize.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ carbonboard --filepath="examples/emissions.csv" --port=3333

- `--filepath`: Path to the CSV file containing your emissions data
- `--port`: Optional port number (default is 8050)
- `--host`: Optional hostname to listen on (default is 127.0.0.1).

Then open your browser to `http://localhost:3333` to view the dashboard.

Expand Down
Loading