Spaces:
Sleeping
Sleeping
analytics_v01 added to see data in a readable and reusable way
Browse filesFiles changed (4)
- analytics_v01.pyAdded+33
- app.py+2-1
- poetry.lock
- pyproject.toml+8-8
123456789101112131415161718192021222324252627282930313233import pandas as pdimport pprintimport astimport jsonimport argparse# ... existing imports ...
# Specify the path to your CSV filefile_path = 'data/logged_data_hub_v01.csv'
def process_data(idx): # Read the CSV file into a DataFrame df = pd.read_csv(file_path)
# Display the DataFrame json_story = (df.iloc[idx, 1]) # iloc[:, 1] selects all rows of the second column str_feedback = (df.iloc[idx, 2]) # Convert the string to a Python object data_list = ast.literal_eval(json_story) filtered_data = [{"role": item["role"], "content": item["content"]} for item in data_list]
# Print the data in pretty JSON format print(json.dumps(filtered_data, indent=4)) print(str_feedback)
if __name__ == "__main__": # Set up command line argument parsing parser = argparse.ArgumentParser(description='Process data from CSV file.') parser.add_argument('idx', type=int, help='Index of the row to process') args = parser.parse_args()
# Call the function with the provided index process_data(args.idx)95 unmodified lines969798991001015 unmodified lines10710810911011111211395 unmodified lines5. Once all story points are explored, provide the synopsis of the story so far.6. Ask follow-up questions to deepen understanding, only if needed7. Don't go down rabbit holes, keep the conversation focused on the story progression.Format for Each Story Point:1. Ask a focused question about that stage of the story5 unmodified lines- Output the following two parts-story:1. Idea board that captures every answer that user has provided in relation to the story circle points2. A synopsis capturing the whole story from the beginning to the end, using the 3 act structure-Try to finish each Story point of Story circle in 5 questions or less and try to get story contruction done in less than 25.Some things to watch out for-* Don't share you are talking about Dan Harmon's Story Circle framework.95 unmodified lines969798991001011025 unmodified lines10810911011111211311495 unmodified lines5. Once all story points are explored, provide the synopsis of the story so far.6. Ask follow-up questions to deepen understanding, only if needed7. Don't go down rabbit holes, keep the conversation focused on the story progression.8. At any given point of time, if "WHAT'S HOLDING THEM BACK" changes, then prompt the user to confirm what's holding the protagnist back.Format for Each Story Point:1. Ask a focused question about that stage of the story5 unmodified lines- Output the following two parts-story:1. Idea board that captures every answer that user has provided in relation to the story circle points2. A synopsis capturing the whole story from the beginning to the end, using the 3 act structure-3. Try to finish each Story point of Story circle in 5 questions or less and try to get story contruction done in less than 25.Some things to watch out for-* Don't share you are talking about Dan Harmon's Story Circle framework.
123456789101112134 unmodified lines181920212223242526272829301 unmodified line3233343536373824 unmodified lines63646566676869[tool.poetry]name = "scripti"version = "0.1.0"description = "your writer assistant"authors = ["kaur-ai"]license = "MIT"readme = "README.md"[tool.poetry.dependencies]python = "^3.12"aiofiles = "23.2.1"annotated-types = "0.7.0"anyio = "4.7.0"4 unmodified linesfastapi = "0.115.6"ffmpy = "0.4.0"filelock = "3.16.1"fsspec = "2024.10.0"gradio = "5.9.0"gradio-client = "1.5.2"h11 = "0.14.0"httpcore = "1.0.7"httpx = "0.28.1"huggingface-hub = "0.26.5"idna = "3.10"jinja2 = "3.1.4"jiter = "0.8.2"1 unmodified linemarkupsafe = "2.1.5"mdurl = "0.1.2"numpy = "2.2.0"openai = "1.57.0"orjson = "3.10.12"packaging = "24.2"pandas = "2.2.3"24 unmodified linesurllib3 = "2.2.3"uvicorn = "0.33.0"websockets = "14.1"pydantic-settings = "2.7.0"[build-system]12345678910111213141516174 unmodified lines222324252627282930311 unmodified line33343536373824 unmodified lines63646566676869[tool.poetry]name = "scripti"version = "0.1.0"description = ""authors = ["kaur-ai <kaurdotai@gmail.com>"]readme = "README.md"[tool.poetry.dependencies]python = "^3.12"gradio = "5.9.0"openai = "1.57.0"pydantic-settings = "2.7.0"huggingface-hub = "0.27.0"ipykernel = "^6.29.5"aiofiles = "23.2.1"annotated-types = "0.7.0"anyio = "4.7.0"4 unmodified linesfastapi = "0.115.6"ffmpy = "0.4.0"filelock = "3.16.1"gradio-client = "1.5.2"h11 = "0.14.0"httpcore = "1.0.7"httpx = "0.28.1"idna = "3.10"jinja2 = "3.1.4"jiter = "0.8.2"1 unmodified linemarkupsafe = "2.1.5"mdurl = "0.1.2"numpy = "2.2.0"orjson = "3.10.12"packaging = "24.2"pandas = "2.2.3"24 unmodified linesurllib3 = "2.2.3"uvicorn = "0.33.0"websockets = "14.1"datasets = "^3.2.0"[build-system]
analytics_v01.pyAdded+33
app.py+2-1
poetry.lock
pyproject.toml+8-8