Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,6 +10,19 @@ from telethon import TelegramClient
|
|
| 10 |
from telethon.sessions import StringSession
|
| 11 |
import streamlit.components.v1 as components
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# ----------- Настройки Telegram -----------
|
| 14 |
TELEGRAM_API_ID = 23646321
|
| 15 |
TELEGRAM_API_HASH = "102edf31d404cb72d17ee4831d4e8c7b"
|
|
|
|
| 10 |
from telethon.sessions import StringSession
|
| 11 |
import streamlit.components.v1 as components
|
| 12 |
|
| 13 |
+
import streamlit as st
|
| 14 |
+
|
| 15 |
+
# Выбор скрипта
|
| 16 |
+
script = st.sidebar.radio("Выберите скрипт:", ["Парсер (app.py)", "Авторизация (workingtoken.py)"])
|
| 17 |
+
|
| 18 |
+
if script == "Авторизация (workingtoken.py)":
|
| 19 |
+
# Запускаем workingtoken.py
|
| 20 |
+
from workingtoken import main
|
| 21 |
+
main()
|
| 22 |
+
else:
|
| 23 |
+
# Запускаем app.py
|
| 24 |
+
st.title("PR Tool made by @Dina")
|
| 25 |
+
# Остальной код app.py
|
| 26 |
# ----------- Настройки Telegram -----------
|
| 27 |
TELEGRAM_API_ID = 23646321
|
| 28 |
TELEGRAM_API_HASH = "102edf31d404cb72d17ee4831d4e8c7b"
|