Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,10 @@ import mido, openai
|
|
6 |
|
7 |
if 'path' not in st.session_state:
|
8 |
st.session_state['path'] = os.path.realpath(os.path.dirname(__file__))
|
|
|
|
|
|
|
|
|
9 |
if 'sessionID' not in st.session_state:
|
10 |
st.session_state['sessionID'] = random.randint(0,99999999)
|
11 |
if 'history' not in st.session_state:
|
|
|
6 |
|
7 |
if 'path' not in st.session_state:
|
8 |
st.session_state['path'] = os.path.realpath(os.path.dirname(__file__))
|
9 |
+
if 'fresh' not in st.session_state:
|
10 |
+
os.remove(os.join(st.session_state['path'], 'output.mid'))
|
11 |
+
os.remove(os.join(st.session_state['path'], 't2m.mid'))
|
12 |
+
st.session_state['fresh'] = False
|
13 |
if 'sessionID' not in st.session_state:
|
14 |
st.session_state['sessionID'] = random.randint(0,99999999)
|
15 |
if 'history' not in st.session_state:
|