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) |