Futuresony commited on
Commit
6a0afb0
·
verified ·
1 Parent(s): aee28b2

Create view_interactions.py

Browse files
Files changed (1) hide show
  1. view_interactions.py +18 -0
view_interactions.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+
4
+ # Directory to store interactions and feedback
5
+ DATA_DIR = "data"
6
+ INTERACTIONS_FILE = os.path.join(DATA_DIR, "interactions.json")
7
+
8
+ def view_interactions():
9
+ if os.path.exists(INTERACTIONS_FILE):
10
+ with open(INTERACTIONS_FILE, "r") as file:
11
+ interactions = json.load(file)
12
+ for interaction in interactions:
13
+ print(json.dumps(interaction, indent=4))
14
+ else:
15
+ print("No interactions found.")
16
+
17
+ if __name__ == "__main__":
18
+ view_interactions()