emilyveenhuis commited on
Commit
3416608
·
verified ·
1 Parent(s): 19f7005

gitignore and README updates

Browse files
Files changed (3) hide show
  1. .gitignore +142 -0
  2. README.md +16 -1
  3. app.py +3 -3
.gitignore ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Python template
2
+ # Byte-compiled / optimized / DLL files
3
+ __pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+
7
+ # C extensions
8
+ *.so
9
+
10
+ # Distribution / packaging
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ #Pipfile.lock
97
+
98
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
99
+ __pypackages__/
100
+
101
+ # Celery stuff
102
+ celerybeat-schedule
103
+ celerybeat.pid
104
+
105
+ # SageMath parsed files
106
+ *.sage.py
107
+
108
+ # Environments
109
+ .env
110
+ .venv
111
+ env/
112
+ venv/
113
+ ENV/
114
+ env.bak/
115
+ venv.bak/
116
+
117
+ # Spyder project settings
118
+ .spyderproject
119
+ .spyproject
120
+
121
+ # Rope project settings
122
+ .ropeproject
123
+
124
+ # mkdocs documentation
125
+ /site
126
+
127
+ # mypy
128
+ .mypy_cache/
129
+ .dmypy.json
130
+ dmypy.json
131
+
132
+ # Pyre type checker
133
+ .pyre/
134
+
135
+ # pytype static type analyzer
136
+ .pytype/
137
+
138
+ # Cython debug symbols
139
+ cython_debug/
140
+
141
+ # Generated assets
142
+ assets/generated_config.yml
README.md CHANGED
@@ -10,4 +10,19 @@ pinned: false
10
  license: apache-2.0
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  license: apache-2.0
11
  ---
12
 
13
+ # NRTK-Gradio
14
+
15
+ For `gradio` configuration, check out the configuration reference at
16
+ https://huggingface.co/docs/hub/spaces-config-reference
17
+
18
+ To run locally, clone repository and install `gradio>=4.0.0` and `requirements.txt` in a Python>=3.8 environment. Run
19
+ `python app.py` to launch the app. For development purposes, it may be helpful to instead run `gradio app.py` to launch
20
+ the app in hot reload mode.
21
+
22
+ ```bash
23
+ pip install "gradio>=4.0.0"
24
+ pip install -r requirements.txt
25
+ python app.py
26
+ ```
27
+
28
+ [Check out NRTK on GitHub!](https://github.com/Kitware/nrtk)
app.py CHANGED
@@ -11,7 +11,7 @@ from nrtk.impls.perturb_image.pybsm.perturber import PybsmPerturber
11
  import gradio as gr # type: ignore
12
 
13
 
14
- asset_dir = Path("./assets")
15
 
16
 
17
  # Define default values for fields for initilization and button clicks
@@ -253,7 +253,7 @@ def submit(data):
253
 
254
 
255
  # Lastly, we define the layout of the application and register the button click listener functions:
256
- with gr.Blocks() as nrtk_demo:
257
  gr.Markdown(
258
  """
259
  # Apply pyBSM Perturbations with NRTK
@@ -469,4 +469,4 @@ with gr.Blocks() as nrtk_demo:
469
  )
470
 
471
 
472
- nrtk_demo.launch(show_error=True)
 
11
  import gradio as gr # type: ignore
12
 
13
 
14
+ asset_dir = Path(__file__).parent / "assets"
15
 
16
 
17
  # Define default values for fields for initilization and button clicks
 
253
 
254
 
255
  # Lastly, we define the layout of the application and register the button click listener functions:
256
+ with gr.Blocks() as demo:
257
  gr.Markdown(
258
  """
259
  # Apply pyBSM Perturbations with NRTK
 
469
  )
470
 
471
 
472
+ demo.launch(show_error=True)