adrianpierce commited on
Commit
99f8e6a
1 Parent(s): a655662

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -18
app.py CHANGED
@@ -5,26 +5,15 @@ import re
5
  import json
6
  from openai import OpenAI
7
  import secrets
8
- import pyperclip
9
 
10
- f = open('test_input.json')
11
- json_test = json.load(f)
12
- st.json(json_test)
13
 
14
- # Define your new dictionary that you want to save
15
- new_data = {
16
- 'key1': 'value1',
17
- 'key2': 'value2'
18
- }
19
-
20
- # The 'with' statement ensures that the file is properly closed after its suite finishes
21
- with open('/data/test_output.json', 'w') as f:
22
- # Use json.dump() to write the dictionary to the file
23
- json.dump(new_data, f, indent=4) # `indent=4` is for pretty-printing the JSON file
24
-
25
- f = open('/data/test_output.json')
26
- json_test_2 = json.load(f)
27
- st.json(json_test_2)
28
 
29
  client = OpenAI(
30
  api_key = st.secrets["open_ai_key"]
 
5
  import json
6
  from openai import OpenAI
7
  import secrets
 
8
 
9
+ # f = open('test_input.json')
10
+ # json_test = json.load(f)
11
+ # st.json(json_test)
12
 
13
+ # # The 'with' statement ensures that the file is properly closed after its suite finishes
14
+ # with open('/data/test_output.json', 'w') as f:
15
+ # # Use json.dump() to write the dictionary to the file
16
+ # json.dump(new_data, f, indent=4) # `indent=4` is for pretty-printing the JSON file
 
 
 
 
 
 
 
 
 
 
17
 
18
  client = OpenAI(
19
  api_key = st.secrets["open_ai_key"]