Spaces:
Running
on
Zero
Running
on
Zero
add readme information
Browse files
README.md
CHANGED
@@ -4,10 +4,87 @@ emoji: 🧬🪬
|
|
4 |
colorFrom: indigo
|
5 |
colorTo: purple
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 5.1.0
|
8 |
app_file: app.py
|
9 |
pinned: true
|
10 |
license: mit
|
11 |
short_description: 'use the ESM3 model to predict protein structures'
|
12 |
---
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
colorFrom: indigo
|
5 |
colorTo: purple
|
6 |
sdk: gradio
|
|
|
7 |
app_file: app.py
|
8 |
pinned: true
|
9 |
license: mit
|
10 |
short_description: 'use the ESM3 model to predict protein structures'
|
11 |
---
|
12 |
|
13 |
+
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:
|
14 |
+
|
15 |
+
### 1. **Open a Command Prompt or PowerShell window**
|
16 |
+
|
17 |
+
- Press `Windows + R`, type `cmd`, and hit Enter.
|
18 |
+
- Alternatively, search for "PowerShell" and open it.
|
19 |
+
|
20 |
+
### 2. **Navigate to your project directory**
|
21 |
+
|
22 |
+
Use the `cd` command to change directories to where your `app.py` and `requirements.txt` are located:
|
23 |
+
|
24 |
+
```bash
|
25 |
+
cd path\to\your\project
|
26 |
+
```
|
27 |
+
|
28 |
+
For example, if your project is located in `C:\Users\YourUser\projects\my-gradio-app`, you would run:
|
29 |
+
|
30 |
+
```bash
|
31 |
+
cd C:\Users\YourUser\projects\my-gradio-app
|
32 |
+
```
|
33 |
+
|
34 |
+
### 3. **Create a virtual environment**
|
35 |
+
|
36 |
+
Run the following command to create a virtual environment called `venv`:
|
37 |
+
|
38 |
+
```bash
|
39 |
+
python -m venv venv
|
40 |
+
```
|
41 |
+
|
42 |
+
This will create a folder called `venv` that contains the virtual environment.
|
43 |
+
|
44 |
+
### 4. **Activate the virtual environment**
|
45 |
+
|
46 |
+
To activate the virtual environment, run:
|
47 |
+
|
48 |
+
- On **Command Prompt**:
|
49 |
+
|
50 |
+
```bash
|
51 |
+
venv\Scripts\activate
|
52 |
+
```
|
53 |
+
|
54 |
+
- On **PowerShell**:
|
55 |
+
|
56 |
+
```bash
|
57 |
+
.\venv\Scripts\Activate
|
58 |
+
```
|
59 |
+
|
60 |
+
After activation, your prompt should change to show `(venv)` indicating that the virtual environment is active.
|
61 |
+
|
62 |
+
### 5. **Install the required packages**
|
63 |
+
|
64 |
+
Now that the virtual environment is activated, install the dependencies from `requirements.txt`:
|
65 |
+
|
66 |
+
```bash
|
67 |
+
pip install -r requirements.txt
|
68 |
+
```
|
69 |
+
|
70 |
+
This will install all the packages listed in `requirements.txt` within your virtual environment.
|
71 |
+
|
72 |
+
### 6. **Run your Gradio app**
|
73 |
+
|
74 |
+
Once the installation is complete, you can run your Gradio app by executing:
|
75 |
+
|
76 |
+
```bash
|
77 |
+
python app.py
|
78 |
+
```
|
79 |
+
|
80 |
+
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.
|
81 |
+
|
82 |
+
### 7. **Deactivate the virtual environment**
|
83 |
+
|
84 |
+
When you're done, you can deactivate the virtual environment by running:
|
85 |
+
|
86 |
+
```bash
|
87 |
+
deactivate
|
88 |
+
```
|
89 |
+
|
90 |
+
This will return you to your system's default Python environment.
|