Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
# Function to handle dynamic content display
|
4 |
+
def show_info(section):
|
5 |
+
if section == "Experiences":
|
6 |
+
return "Details about Rishiraj's experiences..."
|
7 |
+
elif section == "Communities":
|
8 |
+
return "Details about communities Rishiraj is involved in..."
|
9 |
+
elif section == "Recommendations":
|
10 |
+
return "Rishiraj's recommendations..."
|
11 |
+
elif section == "Conferences":
|
12 |
+
return "Conferences attended by Rishiraj..."
|
13 |
+
else:
|
14 |
+
return "Select a section to display information."
|
15 |
+
|
16 |
+
# Creating Gradio Interface
|
17 |
+
with gr.Blocks() as app:
|
18 |
+
gr.Markdown("## Rishiraj Acharya")
|
19 |
+
gr.Image("profile.png")
|
20 |
+
|
21 |
+
with gr.Row():
|
22 |
+
with gr.Column():
|
23 |
+
section_dropdown = gr.Dropdown(["Experiences", "Communities", "Recommendations", "Conferences"], label="Select Information to Display")
|
24 |
+
with gr.Column():
|
25 |
+
info_display = gr.Textbox(label="Information")
|
26 |
+
|
27 |
+
section_dropdown.change(show_info, inputs=section_dropdown, outputs=info_display)
|
28 |
+
|
29 |
+
# Launch the app
|
30 |
+
app.launch()
|