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