Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -889,29 +889,6 @@ def create_search_url_ai(keyword):
|
|
889 |
base_url = "https://huggingface.co/spaces/awacke1/World-Ship-Design?q="
|
890 |
return base_url + keyword.replace(' ', '+')
|
891 |
|
892 |
-
def display_images_and_wikipedia_summaries():
|
893 |
-
image_files = [f for f in os.listdir('.') if f.endswith('.png')]
|
894 |
-
if not image_files:
|
895 |
-
st.write("No PNG images found in the current directory.")
|
896 |
-
return
|
897 |
-
for image_file in image_files:
|
898 |
-
image = Image.open(image_file)
|
899 |
-
st.image(image, caption=image_file, use_column_width=True)
|
900 |
-
keyword = image_file.split('.')[0] # Assumes keyword is the file name without extension
|
901 |
-
# Display Wikipedia and Google search links
|
902 |
-
wikipedia_url = create_search_url_wikipedia(keyword)
|
903 |
-
google_url = create_search_url_google(keyword)
|
904 |
-
youtube_url = create_search_url_youtube(keyword)
|
905 |
-
bing_url = create_search_url_bing(keyword)
|
906 |
-
ai_url = create_search_url_ai(keyword)
|
907 |
-
links_md = f"""
|
908 |
-
[Wikipedia]({wikipedia_url}) |
|
909 |
-
[Google]({google_url}) |
|
910 |
-
[YouTube]({youtube_url}) |
|
911 |
-
[Bing]({bing_url}) |
|
912 |
-
[AI]({ai_url})
|
913 |
-
"""
|
914 |
-
st.markdown(links_md)
|
915 |
|
916 |
def get_all_query_params(key):
|
917 |
return st.query_params().get(key, [])
|
|
|
889 |
base_url = "https://huggingface.co/spaces/awacke1/World-Ship-Design?q="
|
890 |
return base_url + keyword.replace(' ', '+')
|
891 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
892 |
|
893 |
def get_all_query_params(key):
|
894 |
return st.query_params().get(key, [])
|