Update app.py
Browse files
app.py
CHANGED
@@ -131,7 +131,13 @@ with gr.Blocks(theme='JohnSmith9982/small_and_pretty') as demo:
|
|
131 |
submit_button = gr.Button("Submit")
|
132 |
submit_button.click(fn=query_model, inputs=question, outputs=answer)
|
133 |
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
"contemporary": "Here is a link to the pinterest board to help you get started and find inspiration for your style! Just copy this link to get to the board: https://pin.it/1KcrPFm8G",
|
136 |
"ecletic": "Here is a link to the pinterest board to help you get started and find inspiration for your style! Just copy this link to get to the board: https://pin.it/67iavfUmS",
|
137 |
"modern": "Here is a link to the pinterest board to help you get started and find inspiration for your style! Just copy this link to get to the board: https://pin.it/5XriVnahy",
|
|
|
131 |
submit_button = gr.Button("Submit")
|
132 |
submit_button.click(fn=query_model, inputs=question, outputs=answer)
|
133 |
|
134 |
+
|
135 |
+
def get_pinterest_link(question):
|
136 |
+
"""
|
137 |
+
Check if the question contains a keyword and return the corresponding Pinterest link.
|
138 |
+
"""
|
139 |
+
|
140 |
+
keyword_links = {
|
141 |
"contemporary": "Here is a link to the pinterest board to help you get started and find inspiration for your style! Just copy this link to get to the board: https://pin.it/1KcrPFm8G",
|
142 |
"ecletic": "Here is a link to the pinterest board to help you get started and find inspiration for your style! Just copy this link to get to the board: https://pin.it/67iavfUmS",
|
143 |
"modern": "Here is a link to the pinterest board to help you get started and find inspiration for your style! Just copy this link to get to the board: https://pin.it/5XriVnahy",
|