Spaces:
Paused
Paused
Kobkrit Viriyayudhakorn commited on
Commit ·
365020a
1
Parent(s): cfce0d9
Change inteface
Browse files
app.py
CHANGED
|
@@ -8,12 +8,16 @@ def gen(input):
|
|
| 8 |
def zero(input):
|
| 9 |
return openthaigpt.zero(input)
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
with demo:
|
| 12 |
gr.Markdown("OpenThaiGPT version 0.0.10")
|
| 13 |
with gr.Tabs():
|
| 14 |
with gr.TabItem("Generate"):
|
| 15 |
-
|
| 16 |
with gr.TabItem("Zero (GPT Check)"):
|
| 17 |
-
|
| 18 |
|
| 19 |
demo.launch()
|
|
|
|
| 8 |
def zero(input):
|
| 9 |
return openthaigpt.zero(input)
|
| 10 |
|
| 11 |
+
|
| 12 |
+
gen_interface = gr.Interface(fn=gen, inputs=gr.Textbox(lines=3, label="Input Prompt", value="Q: อยากลดความอ้วน ทำอย่างไร\n\nA:"), outputs="text")
|
| 13 |
+
zero_interface = gr.Interface(fn=zero, inputs=gr.Textbox(lines=3, label="Input Text", value="การลดน้ำหนักเป็นเรื่องที่ต้องพิจารณาอย่างละเอียดและรอบคอบเพื่อให้ได้ผลลัพธ์ที่ดีและมีประสิทธิภาพมากที่สุด"), outputs="text")
|
| 14 |
+
|
| 15 |
with demo:
|
| 16 |
gr.Markdown("OpenThaiGPT version 0.0.10")
|
| 17 |
with gr.Tabs():
|
| 18 |
with gr.TabItem("Generate"):
|
| 19 |
+
gen_interface
|
| 20 |
with gr.TabItem("Zero (GPT Check)"):
|
| 21 |
+
zero_interface
|
| 22 |
|
| 23 |
demo.launch()
|