Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import os
|
3 |
+
from dotenv import load_dotenv
|
4 |
+
|
5 |
+
# ε θ½½η―ε’ει
|
6 |
+
load_dotenv()
|
7 |
+
|
8 |
+
def start_web_service():
|
9 |
+
# θΏιζ·»ε ε―ε¨ Web ζε‘ηι»θΎ
|
10 |
+
# ε―θ½ιθ¦θ°η¨ειεηε―ε¨ζΉζ³
|
11 |
+
pass
|
12 |
+
|
13 |
+
# εε»Ί Gradio ζ₯ε£
|
14 |
+
def create_interface():
|
15 |
+
iface = gr.Interface(
|
16 |
+
fn=start_web_service,
|
17 |
+
inputs=None,
|
18 |
+
outputs=gr.Textbox(label="ζε‘ηΆζ"),
|
19 |
+
title="Long Novel GPT",
|
20 |
+
description="ιΏζζ¬ηζζε‘"
|
21 |
+
)
|
22 |
+
return iface
|
23 |
+
|
24 |
+
# ε―ε¨ζε‘
|
25 |
+
if __name__ == "__main__":
|
26 |
+
interface = create_interface()
|
27 |
+
interface.launch(server_name="0.0.0.0", server_port=7860)
|