浏览代码

Delete colab.py

Iyashinouta 1年前
父节点
当前提交
b0f3d2dd0f
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 0 次插入27 次删除
  1. 0
    27
      colab.py

+ 0
- 27
colab.py 查看文件

@@ -1,27 +0,0 @@
1
-import os
2
-import numpy as np
3
-import gradio as gr
4
-from modules import scripts, script_callbacks
5
-from subprocess import getoutput
6
-
7
-def run(command):
8
-    out = getoutput(f"{command}")
9
-    return out
10
-
11
-def on_ui_tabs():     
12
-    with gr.Blocks() as ccolab:
13
-        gr.Markdown(
14
-        """
15
-        ### Google Colab Manually Run Command
16
-        ```py
17
-        Example : pip, git, curl, wget, aria2c, or something else (no need to add "!,$,#"etc. in first code)
18
-        ```
19
-        """)
20
-        with gr.Group():
21
-            with gr.Box():
22
-                command = gr.Textbox(label="Input Command Here", max_lines=1, placeholder="command")
23
-                out_text = gr.Textbox(label="Output Results (no need to scroll down if the output code has appeared, if the output code appears, the code sign is complete)", placeholder="outputs")
24
-                btn_run = gr.Button("run command")
25
-                btn_run.click(fn=run, inputs=command, outputs=out_text)
26
-    return (ccolab, "C Colab", "ccolab"),
27
-script_callbacks.on_ui_tabs(on_ui_tabs)

正在加载...
取消
保存