Spaces:
Runtime error
Runtime error
This streamlit demonstration is meant to simulate two types of memory within cognitive architecture: | |
# Each time we remember a moment, we construct it anew. | |
# We use the building blocks of Episodic Memory which is recall of feelings of being somewhere. | |
# We also use Semantic Memory which is concrete knowledge about our world and about our personal history. | |
# With Episodic Memory, its purpose is to provide us with coherence connecting events. In Episodic Memory, accuracy is less important than consistency. | |
# In order to have a strong sense of self, it is important that our memories fit with our beliefs and feelings about ourselves. | |
import time | |
import re | |
import pandas as pd | |
import numpy as np | |
import torch | |
import torch.nn.functional as F | |
import graphviz as graphviz | |
import pydeck as pdk | |
import streamlit as st | |
from transformers import AutoTokenizer, AutoModel | |
from tokenizers import Tokenizer, AddedToken | |
from st_click_detector import click_detector | |
# Define selection options and sort alphabetically | |
st.graphviz_chart(''' | |
digraph G {bgcolor="#0000FF44:#FF000044" gradientangle=90 | |
fontname="Helvetica,Arial,sans-serif" | |
node [fontname="Helvetica,Arial,sans-serif"] | |
edge [fontname="Helvetica,Arial,sans-serif"] | |
subgraph cluster_0 { | |
style=filled; | |
color=lightgrey; | |
fillcolor="darkgray:gold"; | |
gradientangle=0 | |
node [fillcolor="yellow:green" style=filled gradientangle=270] a0; | |
node [fillcolor="lightgreen:red"] a1; | |
node [fillcolor="lightskyblue:darkcyan"] a2; | |
node [fillcolor="cyan:lightslateblue"] a3; | |
a0 -> a1 -> a2 -> a3; | |
label = "process #1"; | |
} | |
subgraph cluster_1 { | |
node [fillcolor="yellow:magenta" | |
style=filled gradientangle=270] b0; | |
node [fillcolor="violet:darkcyan"] b1; | |
node [fillcolor="peachpuff:red"] b2; | |
node [fillcolor="mediumpurple:purple"] b3; | |
b0 -> b1 -> b2 -> b3; | |
label = "process #2"; | |
color=blue | |
fillcolor="darkgray:gold"; | |
gradientangle=0 | |
style=filled; | |
} | |
start -> a0; | |
start -> b0; | |
a1 -> b3; | |
b2 -> a3; | |
a3 -> a0; | |
a3 -> end; | |
b3 -> end; | |
start [shape=Mdiamond , | |
fillcolor="pink:red", | |
gradientangle=90, | |
style=radial]; | |
end [shape=Msquare, | |
fillcolor="lightyellow:orange", | |
style=radial, | |
gradientangle=90]; | |
} | |
''') |