rholinshead commited on
Commit
fe33ea1
β€’
1 Parent(s): 61bfe35

Upload folder using huggingface_hub

Browse files
Files changed (5) hide show
  1. Dockerfile +16 -0
  2. README.md +6 -6
  3. __init__.py +0 -0
  4. app.py +8 -0
  5. requirements.txt +1 -0
Dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ FROM python:3.9
3
+
4
+ WORKDIR /code
5
+
6
+ COPY --link --chown=1000 . .
7
+
8
+ RUN mkdir -p /tmp/cache/
9
+ RUN chmod a+rwx -R /tmp/cache/
10
+ ENV TRANSFORMERS_CACHE=/tmp/cache/
11
+
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ ENV PYTHONUNBUFFERED=1 GRADIO_ALLOW_FLAGGING=never GRADIO_NUM_PORTS=1 GRADIO_SERVER_NAME=0.0.0.0 GRADIO_SERVER_PORT=7860 SYSTEM=spaces
15
+
16
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -1,10 +1,10 @@
 
1
  ---
2
- title: Gradio Notebook
3
- emoji: πŸƒ
4
- colorFrom: gray
5
- colorTo: blue
6
  sdk: docker
7
  pinned: false
 
8
  ---
9
-
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
+
2
  ---
3
+ tags: [gradio-custom-component]
4
+ title: gradio_notebook V0.0.2
5
+ colorFrom: purple
6
+ colorTo: yellow
7
  sdk: docker
8
  pinned: false
9
+ license: apache-2.0
10
  ---
 
 
__init__.py ADDED
File without changes
app.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from gradio_notebook import GradioNotebook
3
+
4
+ AICONFIG_FILE_PATH = "./example_aiconfig.json" # Can also be empty or None!
5
+ with gr.Blocks() as demo:
6
+ GradioNotebook(config_path=AICONFIG_FILE_PATH)
7
+
8
+ demo.queue().launch()
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ gradio_notebook-0.0.2-py3-none-any.whl