Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -195,13 +195,21 @@ SERVICES = [
|
|
| 195 |
"GGPLAY", "INSTAGRAM", "FMCPAY", "AMAZON"
|
| 196 |
]
|
| 197 |
|
| 198 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
|
| 200 |
def update_notification(msg_input, password):
|
| 201 |
-
global notification_message
|
| 202 |
if password == "2312":
|
| 203 |
-
|
| 204 |
-
|
|
|
|
|
|
|
|
|
|
| 205 |
|
| 206 |
with gr.Blocks() as demo:
|
| 207 |
gr.Markdown("## ZGM API Client - Enter Key to Rent OTP")
|
|
|
|
| 195 |
"GGPLAY", "INSTAGRAM", "FMCPAY", "AMAZON"
|
| 196 |
]
|
| 197 |
|
| 198 |
+
NOTIFICATION_FILE = "notification.txt"
|
| 199 |
+
|
| 200 |
+
def read_notification() -> str:
|
| 201 |
+
if os.path.exists(NOTIFICATION_FILE):
|
| 202 |
+
with open(NOTIFICATION_FILE, "r", encoding="utf-8") as f:
|
| 203 |
+
return f.read()
|
| 204 |
+
return ""
|
| 205 |
|
| 206 |
def update_notification(msg_input, password):
|
|
|
|
| 207 |
if password == "2312":
|
| 208 |
+
with open(NOTIFICATION_FILE, "w", encoding="utf-8") as f:
|
| 209 |
+
f.write(msg_input)
|
| 210 |
+
return msg_input
|
| 211 |
+
return read_notification()
|
| 212 |
+
|
| 213 |
|
| 214 |
with gr.Blocks() as demo:
|
| 215 |
gr.Markdown("## ZGM API Client - Enter Key to Rent OTP")
|