Update app.py
Browse files
app.py
CHANGED
@@ -129,9 +129,9 @@ links=["https://chatgpt.com/","https://www.grammarly.com/","https://www.any.do/"
|
|
129 |
def get_random_link():
|
130 |
return random.choice(links)
|
131 |
|
132 |
-
def create_random_link():
|
133 |
-
random_link = get_random_link()
|
134 |
-
return f'<a href="{random_link}" target="_blank"><img src = "einy.png" style="width:500px;"></a>'
|
135 |
#return f'<a href="{random_link}" target="_blank">I Feel Tech-y!</a>'
|
136 |
|
137 |
# Define the welcome message and specific topics the chatbot can provide information about
|
@@ -208,9 +208,11 @@ with gr.Blocks(theme=theme) as demo:
|
|
208 |
submit_button = gr.Button("Submit!")
|
209 |
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)
|
210 |
submit_button.click(fn=query_model, inputs=question, outputs=answer)
|
211 |
-
|
212 |
-
|
213 |
-
|
|
|
|
|
214 |
|
215 |
#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)
|
216 |
#portal_button.click(fn=create_random_link, inputs=[], outputs="html")
|
|
|
129 |
def get_random_link():
|
130 |
return random.choice(links)
|
131 |
|
132 |
+
#def create_random_link():
|
133 |
+
#random_link = get_random_link()
|
134 |
+
#return f'<a href="{random_link}" target="_blank"><img src = "einy.png" style="width:500px;"></a>'
|
135 |
#return f'<a href="{random_link}" target="_blank">I Feel Tech-y!</a>'
|
136 |
|
137 |
# Define the welcome message and specific topics the chatbot can provide information about
|
|
|
208 |
submit_button = gr.Button("Submit!")
|
209 |
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)
|
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 |
|
217 |
#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)
|
218 |
#portal_button.click(fn=create_random_link, inputs=[], outputs="html")
|