|
--- |
|
title: Conformity Protein Dynamics |
|
emoji: 🧬🪬 |
|
colorFrom: indigo |
|
colorTo: purple |
|
sdk: gradio |
|
sdk_version: 4.44.0 |
|
app_file: app.py |
|
pinned: true |
|
license: mit |
|
short_description: 'use the ESM3 model to predict protein structures' |
|
--- |
|
|
|
To create a virtual environment on a Windows machine and run your Gradio app (`app.py`) after installing the dependencies listed in `requirements.txt`, follow these steps: |
|
|
|
### 1. **Open a Command Prompt or PowerShell window** |
|
|
|
- Press `Windows + R`, type `cmd`, and hit Enter. |
|
- Alternatively, search for "PowerShell" and open it. |
|
|
|
### 2. **Navigate to your project directory** |
|
|
|
Use the `cd` command to change directories to where your `app.py` and `requirements.txt` are located: |
|
|
|
```bash |
|
cd path\to\your\project |
|
``` |
|
|
|
For example, if your project is located in `C:\Users\YourUser\projects\my-gradio-app`, you would run: |
|
|
|
```bash |
|
cd C:\Users\YourUser\projects\my-gradio-app |
|
``` |
|
|
|
### 3. **Create a virtual environment** |
|
|
|
Run the following command to create a virtual environment called `venv`: |
|
|
|
```bash |
|
python -m venv venv |
|
``` |
|
|
|
This will create a folder called `venv` that contains the virtual environment. |
|
|
|
### 4. **Activate the virtual environment** |
|
|
|
To activate the virtual environment, run: |
|
|
|
- On **Command Prompt**: |
|
|
|
```bash |
|
venv\Scripts\activate |
|
``` |
|
|
|
- On **PowerShell**: |
|
|
|
```bash |
|
.\venv\Scripts\Activate |
|
``` |
|
|
|
After activation, your prompt should change to show `(venv)` indicating that the virtual environment is active. |
|
|
|
### 5. **Install the required packages** |
|
|
|
Now that the virtual environment is activated, install the dependencies from `requirements.txt`: |
|
|
|
```bash |
|
pip install -r requirements.txt |
|
``` |
|
|
|
This will install all the packages listed in `requirements.txt` within your virtual environment. |
|
|
|
### 6. **Run your Gradio app** |
|
|
|
Once the installation is complete, you can run your Gradio app by executing: |
|
|
|
```bash |
|
python app.py |
|
``` |
|
|
|
Your Gradio app should now be running, and you can open the provided URL (typically `http://127.0.0.1:7860`) in your browser to access it. |
|
|
|
### 7. **Deactivate the virtual environment** |
|
|
|
When you're done, you can deactivate the virtual environment by running: |
|
|
|
```bash |
|
deactivate |
|
``` |
|
|
|
This will return you to your system's default Python environment. |