Spaces:
Runtime error
Runtime error
Download utils/file_parser_simple.py from Macbath/indicator-modeling: direct link, hf CLI and curl.
- Browser
- Download file 401 Bytes
-
https://huggingface.co/spaces/Macbath/indicator-modeling/resolve/main/utils/file_parser_simple.py
- Command line
-
hf download hf://spaces/Macbath/indicator-modeling/utils/file_parser_simple.py
-
curl -L -o file_parser_simple.py https://huggingface.co/spaces/Macbath/indicator-modeling/resolve/main/utils/file_parser_simple.py
401 Bytes
| from pydantic import BaseModel, Field | |
| from typing import List, Dict, Any | |
| class FileMetadata(BaseModel): | |
| filename: str | |
| columns: List[str] | |
| dtypes: Dict[str, str] | |
| sample_data: List[Dict[str, Any]] | |
| row_count: int | |
| class FileParser: | |
| def __init__(self, max_rows=1000): | |
| self.max_rows = max_rows | |
| def parse_file(self, uploaded_file): | |
| # TODO: implement | |
| pass |