File size: 639 Bytes
8b856a4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import gradio as gr
import os
from dotenv import load_dotenv

# εŠ θ½½ηŽ―ε’ƒε˜ι‡
load_dotenv()

def start_web_service():
    # θΏ™ι‡Œζ·»εŠ ε―εŠ¨ Web ζœεŠ‘ηš„ι€»θΎ‘
    # ε―θƒ½ιœ€θ¦θ°ƒη”¨εŽŸι•œεƒηš„ε―εŠ¨ζ–Ήζ³•
    pass

# εˆ›ε»Ί Gradio ζŽ₯口
def create_interface():
    iface = gr.Interface(
        fn=start_web_service,
        inputs=None,
        outputs=gr.Textbox(label="ζœεŠ‘ηŠΆζ€"),
        title="Long Novel GPT",
        description="ι•Ώζ–‡ζœ¬η”ŸζˆζœεŠ‘"
    )
    return iface

# 启动服劑
if __name__ == "__main__":
    interface = create_interface()
    interface.launch(server_name="0.0.0.0", server_port=7860)