Aman Khare commited on
Commit
85cb432
Β·
1 Parent(s): 7655d3c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +44 -10
README.md CHANGED
@@ -87,38 +87,73 @@ value = clamp(weighted_sum βˆ’ deductions, 0.0, 1.0)
87
 
88
  ---
89
 
90
- ## Setup Instructions
91
 
92
  ### Prerequisites
93
 
94
  - Python 3.11+
95
  - An OpenAI-compatible API key (set as `OPENAI_API_KEY`)
96
 
97
- ### Local Development
98
 
99
  ```bash
100
  # Clone the repository
101
  git clone https://github.com/<your-org>/meta-huggingface-hackathon-team-silver-orca.git
102
  cd meta-huggingface-hackathon-team-silver-orca
103
 
 
 
 
 
 
 
 
104
  # Install dependencies
105
  pip install -r requirements.txt
 
 
 
 
 
 
 
106
 
107
- # Start the environment server
 
 
 
 
 
 
 
 
 
108
  uvicorn server.app:app --host 0.0.0.0 --port 7860
 
109
 
110
- # In another terminal β€” run the baseline inference
 
 
 
 
 
 
 
 
 
 
111
  export OPENAI_API_KEY="sk-..."
112
  export MODEL_NAME="gpt-4o-mini" # or any OpenAI-compatible model
113
  export API_BASE_URL="https://api.openai.com/v1"
114
  python inference.py
115
  ```
116
 
117
- ### Docker
118
-
119
- ```bash
120
- docker build -t meta-huggingface-hackathon-team-silver-orca .
121
- docker run -p 7860:7860 meta-huggingface-hackathon-team-silver-orca
 
122
  ```
123
 
124
  ### API Endpoints
@@ -129,7 +164,6 @@ docker run -p 7860:7860 meta-huggingface-hackathon-team-silver-orca
129
  | `POST` | `/reset` | Start a new episode β†’ `Observation` |
130
  | `POST` | `/step` | Submit an action β†’ `{observation, reward, done, info}` |
131
  | `GET` | `/state` | Inspect environment state β†’ `EnvironmentState` |
132
-
133
  ---
134
 
135
  ## Baseline Scores
 
87
 
88
  ---
89
 
90
+ ## Installation
91
 
92
  ### Prerequisites
93
 
94
  - Python 3.11+
95
  - An OpenAI-compatible API key (set as `OPENAI_API_KEY`)
96
 
97
+ ### Local Setup
98
 
99
  ```bash
100
  # Clone the repository
101
  git clone https://github.com/<your-org>/meta-huggingface-hackathon-team-silver-orca.git
102
  cd meta-huggingface-hackathon-team-silver-orca
103
 
104
+ # Create a virtual environment (optional but recommended)
105
+ python -m venv venv
106
+ # On Linux/macOS:
107
+ source venv/bin/activate
108
+ # On Windows:
109
+ # venv\Scripts\activate
110
+
111
  # Install dependencies
112
  pip install -r requirements.txt
113
+ ```
114
+
115
+ ### Docker Setup
116
+
117
+ ```bash
118
+ docker build -t meta-huggingface-hackathon-team-silver-orca .
119
+ ```
120
 
121
+ ---
122
+
123
+ ## Usage
124
+
125
+ ### 1. Start the Environment Server
126
+
127
+ The environment runs as a REST API. Start the server first before running the agent.
128
+
129
+ #### Using Python
130
+ ```bash
131
  uvicorn server.app:app --host 0.0.0.0 --port 7860
132
+ ```
133
 
134
+ #### Using Docker
135
+ ```bash
136
+ docker run -p 7860:7860 meta-huggingface-hackathon-team-silver-orca
137
+ ```
138
+
139
+ ### 2. Run the Agent (Inference)
140
+
141
+ In another terminal, run the baseline inference script which will interact with the running environment:
142
+
143
+ **On Linux/macOS:**
144
+ ```bash
145
  export OPENAI_API_KEY="sk-..."
146
  export MODEL_NAME="gpt-4o-mini" # or any OpenAI-compatible model
147
  export API_BASE_URL="https://api.openai.com/v1"
148
  python inference.py
149
  ```
150
 
151
+ **On Windows (PowerShell):**
152
+ ```powershell
153
+ $env:OPENAI_API_KEY="sk-..."
154
+ $env:MODEL_NAME="gpt-4o-mini"
155
+ $env:API_BASE_URL="https://api.openai.com/v1"
156
+ python inference.py
157
  ```
158
 
159
  ### API Endpoints
 
164
  | `POST` | `/reset` | Start a new episode β†’ `Observation` |
165
  | `POST` | `/step` | Submit an action β†’ `{observation, reward, done, info}` |
166
  | `GET` | `/state` | Inspect environment state β†’ `EnvironmentState` |
 
167
  ---
168
 
169
  ## Baseline Scores