HimanshuSardana2 commited on
Commit
fcec9bd
Β·
verified Β·
1 Parent(s): abb357f

Upload folder using huggingface_hub

Browse files
Files changed (5) hide show
  1. README.md +1 -1
  2. pyproject.toml +3 -1
  3. server/app.py +7 -2
  4. server/requirements.txt +3 -1
  5. uv.lock +4 -0
README.md CHANGED
@@ -153,4 +153,4 @@ data_analysis_env/
153
  β”‚ β”œβ”€β”€ sales.csv
154
  β”‚ └── products.csv
155
  └── README.md
156
- ```
 
153
  β”‚ β”œβ”€β”€ sales.csv
154
  β”‚ └── products.csv
155
  └── README.md
156
+ ```
pyproject.toml CHANGED
@@ -9,6 +9,8 @@ dependencies = [
9
  "pandas>=2.0.0",
10
  "fastapi>=0.100.0",
11
  "uvicorn>=0.23.0",
 
 
12
  ]
13
 
14
  [project.scripts]
@@ -26,4 +28,4 @@ requires = ["hatchling"]
26
  build-backend = "hatchling.build"
27
 
28
  [tool.hatch.build.targets.wheel]
29
- packages = ["data_analysis_env"]
 
9
  "pandas>=2.0.0",
10
  "fastapi>=0.100.0",
11
  "uvicorn>=0.23.0",
12
+ "gradio>=4.0.0",
13
+ "httpx>=0.24.0",
14
  ]
15
 
16
  [project.scripts]
 
28
  build-backend = "hatchling.build"
29
 
30
  [tool.hatch.build.targets.wheel]
31
+ packages = ["data_analysis_env"]
server/app.py CHANGED
@@ -1,7 +1,11 @@
1
  import os
 
2
  from pathlib import Path
3
 
 
 
4
  from openenv.core.env_server import create_app
 
5
 
6
  from server.quantum_openenv_env_environment import DataAnalysisEnvironment
7
  from models import DataAnalysisAction, DataAnalysisObservation
@@ -12,8 +16,9 @@ def create_data_analysis_environment():
12
  return DataAnalysisEnvironment(data_dir=data_dir)
13
 
14
 
15
- app = create_app(
16
- create_data_analysis_environment,
 
17
  DataAnalysisAction,
18
  DataAnalysisObservation,
19
  env_name="data_analysis_env",
 
1
  import os
2
+ import sys
3
  from pathlib import Path
4
 
5
+ sys.path.insert(0, str(Path(__file__).parent.parent))
6
+
7
  from openenv.core.env_server import create_app
8
+ from openenv.core.env_server.web_interface import create_web_interface_app
9
 
10
  from server.quantum_openenv_env_environment import DataAnalysisEnvironment
11
  from models import DataAnalysisAction, DataAnalysisObservation
 
16
  return DataAnalysisEnvironment(data_dir=data_dir)
17
 
18
 
19
+ env = create_data_analysis_environment()
20
+ app = create_web_interface_app(
21
+ env,
22
  DataAnalysisAction,
23
  DataAnalysisObservation,
24
  env_name="data_analysis_env",
server/requirements.txt CHANGED
@@ -1,4 +1,6 @@
1
  openenv-core
2
  pandas
3
  fastapi
4
- uvicorn
 
 
 
1
  openenv-core
2
  pandas
3
  fastapi
4
+ uvicorn
5
+ gradio
6
+ httpx
uv.lock CHANGED
@@ -602,6 +602,8 @@ version = "0.1.0"
602
  source = { editable = "." }
603
  dependencies = [
604
  { name = "fastapi" },
 
 
605
  { name = "openenv-core" },
606
  { name = "pandas", version = "2.3.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
607
  { name = "pandas", version = "3.0.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
@@ -619,6 +621,8 @@ dev = [
619
  requires-dist = [
620
  { name = "black", marker = "extra == 'dev'", specifier = ">=23.0.0" },
621
  { name = "fastapi", specifier = ">=0.100.0" },
 
 
622
  { name = "mypy", marker = "extra == 'dev'", specifier = ">=1.0.0" },
623
  { name = "openenv-core", specifier = ">=0.1.0" },
624
  { name = "pandas", specifier = ">=2.0.0" },
 
602
  source = { editable = "." }
603
  dependencies = [
604
  { name = "fastapi" },
605
+ { name = "gradio" },
606
+ { name = "httpx" },
607
  { name = "openenv-core" },
608
  { name = "pandas", version = "2.3.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
609
  { name = "pandas", version = "3.0.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
 
621
  requires-dist = [
622
  { name = "black", marker = "extra == 'dev'", specifier = ">=23.0.0" },
623
  { name = "fastapi", specifier = ">=0.100.0" },
624
+ { name = "gradio", specifier = ">=4.0.0" },
625
+ { name = "httpx", specifier = ">=0.24.0" },
626
  { name = "mypy", marker = "extra == 'dev'", specifier = ">=1.0.0" },
627
  { name = "openenv-core", specifier = ">=0.1.0" },
628
  { name = "pandas", specifier = ">=2.0.0" },