A Python Flask app for searching MURAL using IBM Watson Discovery.
This app is part of a larger sample. Read the blog: Searching MURAL
See also: Demo video
- Create a local working directory
- In your browser, navigate to the MURAL-search GitHub repo
- Click the button labeled
Code
and then select "Download ZIP" to download the sample code - Uncompress the sample code into your working directory
On a command line, in the working directory, create a new local, virtual Python environment:
python -m venv <virtual-environment-name>
-
Use the virtual environment:
Windows<virtual-environment-name>\Scripts\activate.bat
UNIX or MacOSsource <virtual-environment-name>/bin/activate
-
In the
src
subdirectory of the sample code, install Python libraries required for the sample app:pip install -r requirements.txt
-
Set three environment variables:
DISCOVERY_APIKEY
You can get this from the Manage page of your IBM Watson Discovery intance in IBM Cloud DISCOVERY_URL
You can get this from the Manage page of your Discovery intance in IBM Cloud DISCOVERY_PROJECT_ID
You can get this from the sample notebook used to create the project or from the Discovery web interface
Run the app from the
src
subdirectory:python server.py
Open a new browser tab with this address: http://localhost:8080