Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -171,6 +171,8 @@ if __name__ == "__main__":
|
|
| 171 |
response = bot._chatbot.predict(question)
|
| 172 |
highlighted_answer = highlight_text(response["answer"], response["highlight_start"], response["highlight_end"])
|
| 173 |
return highlighted_answer
|
|
|
|
|
|
|
| 174 |
|
| 175 |
-
demo = gr.ChatInterface(fn=chat_interface, title="CE66-04: Thai Question Answering System by using Deep Learning")
|
| 176 |
demo.launch()
|
|
|
|
| 171 |
response = bot._chatbot.predict(question)
|
| 172 |
highlighted_answer = highlight_text(response["answer"], response["highlight_start"], response["highlight_end"])
|
| 173 |
return highlighted_answer
|
| 174 |
+
|
| 175 |
+
EXAMPLE = ["หลิน ไห่เฟิง มีชื่อเรียกอีกชื่อว่าอะไร" , "ใครเป็นผู้ตั้งสภาเศรษฐกิจโลกขึ้นในปี พ.ศ. 2514 โดยทุกปีจะมีการประชุมที่ประเทศสวิตเซอร์แลนด์", "โปรดิวเซอร์ของอัลบั้มตลอดกาล ของวงคีรีบูนคือใคร", "สกุลเดิมของหม่อมครูนุ่ม นวรัตน ณ อยุธยา คืออะไร"]
|
| 176 |
|
| 177 |
+
demo = gr.ChatInterface(fn=chat_interface, examples=EXAMPLE, title="CE66-04: Thai Question Answering System by using Deep Learning")
|
| 178 |
demo.launch()
|