Update app.py
Browse files
app.py
CHANGED
@@ -243,7 +243,7 @@ with gr.Blocks() as demo:
|
|
243 |
def ping_test(hostname):
|
244 |
try:
|
245 |
# Run the ping command for 4 packets
|
246 |
-
result = subprocess.run(['ping', '-c', '4',
|
247 |
output = result.stdout
|
248 |
if "0% packet loss" in output:
|
249 |
return f"Ping successful:\n{output}"
|
|
|
243 |
def ping_test(hostname):
|
244 |
try:
|
245 |
# Run the ping command for 4 packets
|
246 |
+
result = subprocess.run(['ping', '-c', '4', www.google.com], stdout=subprocess.PIPE, text=True)
|
247 |
output = result.stdout
|
248 |
if "0% packet loss" in output:
|
249 |
return f"Ping successful:\n{output}"
|