sophcheng commited on
Commit
60fa6df
·
verified ·
1 Parent(s): c1621b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -124,6 +124,11 @@ def query_model(question):
124
  response = generate_response(question, relevant_segment)
125
  return response
126
 
 
 
 
 
 
127
  # Define the welcome message and specific topics the chatbot can provide information about
128
  welcome_message = """
129
  ## Albot AI-nstein is your AI-driven assistant, for all things AI.
@@ -198,8 +203,8 @@ with gr.Blocks(theme=theme) as demo:
198
  submit_button = gr.Button("Submit!")
199
  answer = gr.Textbox(label="AI-nswer:", placeholder="Hello, World! \nAsk me anything about AI ML, and helpful tools you may want to use!", interactive=False, lines=10)
200
  submit_button.click(fn=query_model, inputs=question, outputs=answer)
201
- gr.Image("einy.png", container = False, show_share_button = False, show_download_button = False, label="output", show_label=True, elem_id="output_image", scale=0, width=500)
202
-
203
 
204
  #def display_response(question):
205
  #response, confidence_score = query_model(question)
 
124
  response = generate_response(question, relevant_segment)
125
  return response
126
 
127
+ link_int=random.randint(0,6)
128
+ links=["https://chatgpt.com/","https://www.grammarly.com/","https://www.any.do/","https://scheduler.ai/","https://huggingface.co/spaces/MukBot/MukBot","https://huggingface.co/spaces/CalmConnect/calm-connect","https://chatgpt.com/g/g-3DGi2iLag-scholargpt","https://chatgpt.com/g/g-E7eSRUHy6-travel-guide"]
129
+ def open_link():
130
+ return gr.HTML('<a href="'+links[link_int]+'" target="_blank">I'm Feeling Tech-y!</a>')
131
+
132
  # Define the welcome message and specific topics the chatbot can provide information about
133
  welcome_message = """
134
  ## Albot AI-nstein is your AI-driven assistant, for all things AI.
 
203
  submit_button = gr.Button("Submit!")
204
  answer = gr.Textbox(label="AI-nswer:", placeholder="Hello, World! \nAsk me anything about AI ML, and helpful tools you may want to use!", interactive=False, lines=10)
205
  submit_button.click(fn=query_model, inputs=question, outputs=answer)
206
+ portal_button = gr.Image("einy.png", container = False, show_share_button = False, show_download_button = False, label="output", show_label=True, elem_id="output_image", scale=0, width=500)
207
+ portal_button.click(fn=open_link, inputs=[], outputs="html")
208
 
209
  #def display_response(question):
210
  #response, confidence_score = query_model(question)