Spaces:
Sleeping
Sleeping
added project heading and share= True in gradio launch
Browse files
app.py
CHANGED
@@ -42,7 +42,9 @@ def infer_1(inp, chat_history):
|
|
42 |
|
43 |
|
44 |
#Ancillary variables
|
45 |
-
project_heading = """
|
|
|
|
|
46 |
|
47 |
This Chatbot is based on a fine-tuned version of 'GPT2-Small'. Primarily, the text from Robert Kiyosaki's book, "Rich Dad Poor Dad," was processed and used in training.
|
48 |
|
@@ -88,9 +90,10 @@ training_data = pd.read_csv('ques_ans_v5.csv', index_col = 0)
|
|
88 |
|
89 |
#Launch with gradio
|
90 |
with gr.Blocks() as demo:
|
91 |
-
gr.
|
92 |
#gr.Markdown(value = "This Chatbot is Based on a fine-tuned version of 'GPT2-Small'. Primarily the text from Robert Kiyosaki's book, \"Rich Dad Poor Dad\" was processed and used in training.")
|
93 |
-
|
|
|
94 |
chatbot = gr.Chatbot(label = "Trained on scripts from \"Rich Dad Poor Dad\"") #value = [['Hey there User', 'Hey there CB']]
|
95 |
msg = gr.Textbox(label = 'Press enter to submit!')
|
96 |
clear = gr.ClearButton([msg, chatbot])
|
@@ -103,4 +106,4 @@ with gr.Blocks() as demo:
|
|
103 |
|
104 |
gr.HTML(model_details_HTML)
|
105 |
|
106 |
-
demo.launch(debug=True)
|
|
|
42 |
|
43 |
|
44 |
#Ancillary variables
|
45 |
+
project_heading = '<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><style type="text/css">ol{margin:0;padding:0}table td,table th{padding:0}.c1{-webkit-text-decoration-skip:none;color:#000000;font-weight:700;text-decoration:underline;vertical-align:baseline;text-decoration-skip-ink:none;font-size:26pt;font-family:"Arial";font-style:normal}.c2{padding-top:0pt;padding-bottom:3pt;line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:center}.c0{background-color:#ffffff;max-width:468pt;padding:72pt 72pt 72pt 72pt}.title{padding-top:0pt;color:#000000;font-size:26pt;padding-bottom:3pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}.subtitle{padding-top:0pt;color:#666666;font-size:15pt;padding-bottom:16pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}li{color:#000000;font-size:11pt;font-family:"Arial"}p{margin:0;color:#000000;font-size:11pt;font-family:"Arial"}h1{padding-top:20pt;color:#000000;font-size:20pt;padding-bottom:6pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}h2{padding-top:18pt;color:#000000;font-size:16pt;padding-bottom:6pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}h3{padding-top:16pt;color:#434343;font-size:14pt;padding-bottom:4pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}h4{padding-top:14pt;color:#666666;font-size:12pt;padding-bottom:4pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}h5{padding-top:12pt;color:#666666;font-size:11pt;padding-bottom:4pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;orphans:2;widows:2;text-align:left}h6{padding-top:12pt;color:#666666;font-size:11pt;padding-bottom:4pt;font-family:"Arial";line-height:1.15;page-break-after:avoid;font-style:italic;orphans:2;widows:2;text-align:left}</style></head><body class="c0 doc-content"><p class="c2 title" id="h.gqbolkoo61b7"><span class="c1">Personal Finance ChatBot</span></p></body></html>'
|
46 |
+
|
47 |
+
project_des = """## Project Description
|
48 |
|
49 |
This Chatbot is based on a fine-tuned version of 'GPT2-Small'. Primarily, the text from Robert Kiyosaki's book, "Rich Dad Poor Dad," was processed and used in training.
|
50 |
|
|
|
90 |
|
91 |
#Launch with gradio
|
92 |
with gr.Blocks() as demo:
|
93 |
+
gr.HTML(project_heading)
|
94 |
#gr.Markdown(value = "This Chatbot is Based on a fine-tuned version of 'GPT2-Small'. Primarily the text from Robert Kiyosaki's book, \"Rich Dad Poor Dad\" was processed and used in training.")
|
95 |
+
gr.Markdown(value = project_des)
|
96 |
+
|
97 |
chatbot = gr.Chatbot(label = "Trained on scripts from \"Rich Dad Poor Dad\"") #value = [['Hey there User', 'Hey there CB']]
|
98 |
msg = gr.Textbox(label = 'Press enter to submit!')
|
99 |
clear = gr.ClearButton([msg, chatbot])
|
|
|
106 |
|
107 |
gr.HTML(model_details_HTML)
|
108 |
|
109 |
+
demo.launch(share=True, debug=True)
|