瀏覽代碼

gradio界面初步

ysyyhhh 9 月之前
父節點
當前提交
aeb5bb8bd6
共有 1 個文件被更改,包括 20 次插入0 次删除
  1. 20 0
      main.py

+ 20 - 0
main.py

@@ -0,0 +1,20 @@
+import numpy as np
+import gradio as gr
+
+# 生成一个文生图的gradio界面
+
+
+def generate_image(text):
+
+    return ""
+
+
+demo = gr.Interface(
+    fn=generate_image,
+    inputs=gr.inputs.Textbox(lines=5, label="输入文本"),
+    outputs="image",
+)
+
+
+if __name__ == "__main__":
+    demo.launch()