DebasishDhal99 commited on
Commit
80699e5
·
1 Parent(s): 994e5da

feat: basic setup with docker, no real code has been added for visualization yet

Browse files
Files changed (6) hide show
  1. .gitignore +4 -0
  2. Dockerfile +18 -0
  3. README.md +12 -0
  4. app.py +14 -0
  5. compose.yaml +7 -0
  6. requirements.txt +5 -0
.gitignore CHANGED
@@ -6,6 +6,9 @@ __pycache__/
6
  # C extensions
7
  *.so
8
 
 
 
 
9
  # Distribution / packaging
10
  .Python
11
  build/
@@ -77,6 +80,7 @@ target/
77
 
78
  # Jupyter Notebook
79
  .ipynb_checkpoints
 
80
 
81
  # IPython
82
  profile_default/
 
6
  # C extensions
7
  *.so
8
 
9
+ #readme
10
+ notes.md
11
+
12
  # Distribution / packaging
13
  .Python
14
  build/
 
80
 
81
  # Jupyter Notebook
82
  .ipynb_checkpoints
83
+ *.ipynb
84
 
85
  # IPython
86
  profile_default/
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12-slim
2
+
3
+ ENV PYTHONDONTWRITEBYTECODE=1
4
+ ENV PYTHONUNBUFFERED=1
5
+ ENV PIP_NO_CACHE_DIR=1
6
+
7
+ WORKDIR /app
8
+
9
+ COPY requirements.txt .
10
+
11
+ RUN pip install --upgrade pip && \
12
+ pip install -r requirements.txt
13
+
14
+ COPY . .
15
+
16
+ EXPOSE 7860
17
+
18
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -1 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  # rope-implementation
 
1
+ ---
2
+ title: ROPE Embedding visualization
3
+ emoji: 📚
4
+ colorFrom: gray
5
+ colorTo: green
6
+ sdk: gradio
7
+ sdk_version: 6.26.0
8
+ python_version: 3.11
9
+ app_file: app.py
10
+ pinned: false
11
+ short_description: CVisualize how ROPE changes the embeddings
12
+ ---
13
  # rope-implementation
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ with gr.Blocks(title="RoPE Explorer") as demo:
4
+ with gr.Tabs():
5
+ with gr.Tab("Block 01"):
6
+ gr.Markdown("## Block 01")
7
+ gr.Markdown("Placeholder for the first visualization.")
8
+
9
+ with gr.Tab("Block 02"):
10
+ gr.Markdown("## Block 02")
11
+ gr.Markdown("Placeholder for the second visualization.")
12
+
13
+ if __name__ == "__main__":
14
+ demo.launch( server_name="0.0.0.0", server_port=7860, )
compose.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ services:
2
+ rope-explorer:
3
+ build: .
4
+ ports:
5
+ - "7860:7860"
6
+ volumes:
7
+ - .:/app
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ gradio==6.26.0
2
+
3
+ numpy==2.5.2
4
+
5
+ plotly==7.0.0