sophcheng commited on
Commit
819f568
·
verified ·
1 Parent(s): 1f8a616

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -124,7 +124,7 @@ def 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 get_random_link():
130
  return random.choice(links)
@@ -210,7 +210,7 @@ with gr.Blocks(theme=theme) as demo:
210
  submit_button.click(fn=query_model, inputs=question, outputs=answer)
211
  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)
212
  portal_button = gr.Button("Bring me to a cool example of AI!")
213
- portal_button.click(fn=get_random_link, inputs=[], outputs=None)
214
  #interface = gr.Interface(fn=create_random_link, inputs=[], outputs="html")
215
  #interface.launch()
216
 
 
124
  response = generate_response(question, relevant_segment)
125
  return response
126
 
127
+ link = "https://chatgpt.com/"
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 get_random_link():
130
  return random.choice(links)
 
210
  submit_button.click(fn=query_model, inputs=question, outputs=answer)
211
  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)
212
  portal_button = gr.Button("Bring me to a cool example of AI!")
213
+ portal_button.click(fn=get_random_link, inputs=[], outputs=link)
214
  #interface = gr.Interface(fn=create_random_link, inputs=[], outputs="html")
215
  #interface.launch()
216