Update app.py
Browse files
app.py
CHANGED
@@ -19,6 +19,15 @@ import gradio as gr
|
|
19 |
import asyncio
|
20 |
from telegram import Bot
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
token = '7370905765:AAHvmlw68cW7RxWzsJE1yxTzgf3xQFiokDo'
|
23 |
chat_id = '7431171535'
|
24 |
pd.set_option('display.max_colwidth', None)
|
|
|
19 |
import asyncio
|
20 |
from telegram import Bot
|
21 |
|
22 |
+
import os
|
23 |
+
|
24 |
+
def set_dns_resolver(dns_server):
|
25 |
+
with open('/etc/resolv.conf', 'w') as resolv_conf:
|
26 |
+
resolv_conf.write(f"nameserver {dns_server}\n")
|
27 |
+
|
28 |
+
# Example usage with Cloudflare DNS (1.1.1.1)
|
29 |
+
set_dns_resolver('1.1.1.1')
|
30 |
+
|
31 |
token = '7370905765:AAHvmlw68cW7RxWzsJE1yxTzgf3xQFiokDo'
|
32 |
chat_id = '7431171535'
|
33 |
pd.set_option('display.max_colwidth', None)
|