Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,19 +1,14 @@
|
|
1 |
import gradio as gr
|
2 |
-
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
def sejarah_interface(question):
|
7 |
-
return question
|
8 |
|
9 |
iface = gr.Interface(
|
10 |
-
|
11 |
-
fn=sejarah_interface,
|
12 |
inputs=gr.inputs.Textbox(label="Please Type Your Question Here: "),
|
13 |
outputs=[gr.outputs.Textbox(label="Answers")],
|
14 |
description="## Question Answering system\n\nIt supports **English** and **Bahasa Malaysia**.",
|
15 |
allow_flagging = False
|
16 |
)
|
17 |
|
18 |
-
#Demo for the chatbot
|
19 |
iface.launch(inline = False)
|
|
|
1 |
import gradio as gr
|
2 |
+
from Sejarah import Sejarah
|
3 |
|
4 |
+
sej = Sejarah()
|
|
|
|
|
|
|
5 |
|
6 |
iface = gr.Interface(
|
7 |
+
fn=sej.interface,
|
|
|
8 |
inputs=gr.inputs.Textbox(label="Please Type Your Question Here: "),
|
9 |
outputs=[gr.outputs.Textbox(label="Answers")],
|
10 |
description="## Question Answering system\n\nIt supports **English** and **Bahasa Malaysia**.",
|
11 |
allow_flagging = False
|
12 |
)
|
13 |
|
|
|
14 |
iface.launch(inline = False)
|