Skip to content

ZhuBit/elasticsearch_zurich

Repository files navigation

Zurich City Guide App

Overview

This application provides a searchable guide to Zurich's cultural history, landmarks, education, and more, utilizing Elasticsearch for efficient querying and OpenAI for dynamic answer generation. Designed with a Flask, Elasticsearch and simple HTML template, users can interact through a chat interface to find detailed information about Zurich.

Features

  • Elasticsearch Integration: Leverages Elasticsearch to index and search through Zurich's city data.
  • Sentence Transformers: Utilizes sentence-transformers for generating document embeddings, enhancing search relevance.
  • OpenAI API: Employs OpenAI's API for generating contextual answers to user queries.
  • Simple UI: Offers a straightforward user interface for querying and receiving information.
  • Flask Application: Built on Flask, facilitating easy web server setup and interaction.

Data Variety Disclaimer

Please note that the data utilized in this application was sourced through web scraping from Zurich's official city site, focusing on cultural history, landmarks, education, and more. Therefore, simple searches related to broad categories like Landmarks, History, Politics, Travel, and Tourism are more likely to yield reliable results. Users seeking highly specific or nuanced information should verify the data through additional sources when necessary.

Installation

  1. Clone the repository:
git clone git@github.com:ZhuBit/elasticsearch_zurich.git
  1. Creat .env file with:
OPENAI_API_KEY=<your_openai_api_key>
  1. Install the required packages:
pip install -r requirements.txt
  1. Creat docker container for elasticsearch:
docker run -p 9200:9200 -d --name elasticsearch_zurich \
  -e "discovery.type=single-node" \
  -e "xpack.security.enabled=false" \
  -e "xpack.security.http.ssl.enabled=false" \
  -e "xpack.license.self_generated.type=trial" \
  docker.elastic.co/elasticsearch/elasticsearch:8.11.0
  1. Start Docker container:
docker start <container_id>
  1. Create index and index data:
flask reindex
  1. Run the application:
flask run

Requirements

  • Python 3.8+
  • Elasticsearch 7.x+
  • An active OpenAI API key

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors