File size: 1,073 Bytes
642cb71
065d25e
 
642cb71
065d25e
 
 
 
 
 
 
 
642cb71
065d25e
 
642cb71
065d25e
 
 
 
 
 
 
 
 
 
 
642cb71
065d25e
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import gradio as gr
import subprocess
import os

def setup_rdp():
    # Download required files
    subprocess.run("curl -s -L -o run1.py https://gitlab.com/chamod12/GCRD-Linux-Colab/-/raw/main/test.py", shell=True)
    subprocess.run("curl -s -L -o run.py https://gitlab.com/chamod12/GCRD-Linux-Colab/-/raw/main/run.py", shell=True)
    
    # Execute the setup scripts
    result1 = subprocess.run("python run1.py", shell=True, capture_output=True, text=True)
    result2 = subprocess.run("python run.py", shell=True, capture_output=True, text=True)
    
    output = result1.stdout + "\n" + result2.stdout
    return output

def create_rdp_interface():
    with gr.Blocks() as app:
        gr.Markdown("# Windows RDP Setup Interface")
        
        with gr.Row():
            setup_button = gr.Button("Setup Windows RDP")
            output = gr.Textbox(label="Setup Output", lines=10)
            
        setup_button.click(fn=setup_rdp, outputs=output)
        
    return app

# Create and launch the interface
app = create_rdp_interface()
app.launch(share=True)