Pouyae commited on
Commit
be1fe39
·
1 Parent(s): 152dcaa
Files changed (5) hide show
  1. .gitignore +347 -0
  2. .python-version +1 -0
  3. app.py +24 -0
  4. pyproject.toml +10 -0
  5. uv.lock +0 -0
.gitignore ADDED
@@ -0,0 +1,347 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Created by https://www.toptal.com/developers/gitignore/api/python,pycharm,pycharm+all
2
+ # Edit at https://www.toptal.com/developers/gitignore?templates=python,pycharm,pycharm+all
3
+
4
+ ### PyCharm ###
5
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
6
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
7
+
8
+ # User-specific stuff
9
+ .idea/**/workspace.xml
10
+ .idea/**/tasks.xml
11
+ .idea/**/usage.statistics.xml
12
+ .idea/**/dictionaries
13
+ .idea/**/shelf
14
+
15
+ # AWS User-specific
16
+ .idea/**/aws.xml
17
+
18
+ # Generated files
19
+ .idea/**/contentModel.xml
20
+
21
+ # Sensitive or high-churn files
22
+ .idea/**/dataSources/
23
+ .idea/**/dataSources.ids
24
+ .idea/**/dataSources.local.xml
25
+ .idea/**/sqlDataSources.xml
26
+ .idea/**/dynamic.xml
27
+ .idea/**/uiDesigner.xml
28
+ .idea/**/dbnavigator.xml
29
+
30
+ # Gradle
31
+ .idea/**/gradle.xml
32
+ .idea/**/libraries
33
+
34
+ # Gradle and Maven with auto-import
35
+ # When using Gradle or Maven with auto-import, you should exclude module files,
36
+ # since they will be recreated, and may cause churn. Uncomment if using
37
+ # auto-import.
38
+ # .idea/artifacts
39
+ # .idea/compiler.xml
40
+ # .idea/jarRepositories.xml
41
+ # .idea/modules.xml
42
+ # .idea/*.iml
43
+ # .idea/modules
44
+ # *.iml
45
+ # *.ipr
46
+
47
+ # CMake
48
+ cmake-build-*/
49
+
50
+ # Mongo Explorer plugin
51
+ .idea/**/mongoSettings.xml
52
+
53
+ # File-based project format
54
+ *.iws
55
+
56
+ # IntelliJ
57
+ out/
58
+
59
+ # mpeltonen/sbt-idea plugin
60
+ .idea_modules/
61
+
62
+ # JIRA plugin
63
+ atlassian-ide-plugin.xml
64
+
65
+ # Cursive Clojure plugin
66
+ .idea/replstate.xml
67
+
68
+ # SonarLint plugin
69
+ .idea/sonarlint/
70
+
71
+ # Crashlytics plugin (for Android Studio and IntelliJ)
72
+ com_crashlytics_export_strings.xml
73
+ crashlytics.properties
74
+ crashlytics-build.properties
75
+ fabric.properties
76
+
77
+ # Editor-based Rest Client
78
+ .idea/httpRequests
79
+
80
+ # Android studio 3.1+ serialized cache file
81
+ .idea/caches/build_file_checksums.ser
82
+
83
+ ### PyCharm Patch ###
84
+ # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
85
+
86
+ # *.iml
87
+ # modules.xml
88
+ # .idea/misc.xml
89
+ # *.ipr
90
+
91
+ # Sonarlint plugin
92
+ # https://plugins.jetbrains.com/plugin/7973-sonarlint
93
+ .idea/**/sonarlint/
94
+
95
+ # SonarQube Plugin
96
+ # https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
97
+ .idea/**/sonarIssues.xml
98
+
99
+ # Markdown Navigator plugin
100
+ # https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
101
+ .idea/**/markdown-navigator.xml
102
+ .idea/**/markdown-navigator-enh.xml
103
+ .idea/**/markdown-navigator/
104
+
105
+ # Cache file creation bug
106
+ # See https://youtrack.jetbrains.com/issue/JBR-2257
107
+ .idea/$CACHE_FILE$
108
+
109
+ # CodeStream plugin
110
+ # https://plugins.jetbrains.com/plugin/12206-codestream
111
+ .idea/codestream.xml
112
+
113
+ # Azure Toolkit for IntelliJ plugin
114
+ # https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
115
+ .idea/**/azureSettings.xml
116
+
117
+ ### PyCharm+all ###
118
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
119
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
120
+
121
+ # User-specific stuff
122
+
123
+ # AWS User-specific
124
+
125
+ # Generated files
126
+
127
+ # Sensitive or high-churn files
128
+
129
+ # Gradle
130
+
131
+ # Gradle and Maven with auto-import
132
+ # When using Gradle or Maven with auto-import, you should exclude module files,
133
+ # since they will be recreated, and may cause churn. Uncomment if using
134
+ # auto-import.
135
+ # .idea/artifacts
136
+ # .idea/compiler.xml
137
+ # .idea/jarRepositories.xml
138
+ # .idea/modules.xml
139
+ # .idea/*.iml
140
+ # .idea/modules
141
+ # *.iml
142
+ # *.ipr
143
+
144
+ # CMake
145
+
146
+ # Mongo Explorer plugin
147
+
148
+ # File-based project format
149
+
150
+ # IntelliJ
151
+
152
+ # mpeltonen/sbt-idea plugin
153
+
154
+ # JIRA plugin
155
+
156
+ # Cursive Clojure plugin
157
+
158
+ # SonarLint plugin
159
+
160
+ # Crashlytics plugin (for Android Studio and IntelliJ)
161
+
162
+ # Editor-based Rest Client
163
+
164
+ # Android studio 3.1+ serialized cache file
165
+
166
+ ### PyCharm+all Patch ###
167
+ # Ignore everything but code style settings and run configurations
168
+ # that are supposed to be shared within teams.
169
+
170
+ .idea/*
171
+
172
+ !.idea/codeStyles
173
+ !.idea/runConfigurations
174
+
175
+ ### Python ###
176
+ # Byte-compiled / optimized / DLL files
177
+ __pycache__/
178
+ *.py[cod]
179
+ *$py.class
180
+
181
+ # C extensions
182
+ *.so
183
+
184
+ # Distribution / packaging
185
+ .Python
186
+ build/
187
+ develop-eggs/
188
+ dist/
189
+ downloads/
190
+ eggs/
191
+ .eggs/
192
+ lib/
193
+ lib64/
194
+ parts/
195
+ sdist/
196
+ var/
197
+ wheels/
198
+ share/python-wheels/
199
+ *.egg-info/
200
+ .installed.cfg
201
+ *.egg
202
+ MANIFEST
203
+
204
+ # PyInstaller
205
+ # Usually these files are written by a python script from a template
206
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
207
+ *.manifest
208
+ *.spec
209
+
210
+ # Installer logs
211
+ pip-log.txt
212
+ pip-delete-this-directory.txt
213
+
214
+ # Unit test / coverage reports
215
+ htmlcov/
216
+ .tox/
217
+ .nox/
218
+ .coverage
219
+ .coverage.*
220
+ .cache
221
+ nosetests.xml
222
+ coverage.xml
223
+ *.cover
224
+ *.py,cover
225
+ .hypothesis/
226
+ .pytest_cache/
227
+ cover/
228
+
229
+ # Translations
230
+ *.mo
231
+ *.pot
232
+
233
+ # Django stuff:
234
+ *.log
235
+ local_settings.py
236
+ db.sqlite3
237
+ db.sqlite3-journal
238
+
239
+ # Flask stuff:
240
+ instance/
241
+ .webassets-cache
242
+
243
+ # Scrapy stuff:
244
+ .scrapy
245
+
246
+ # Sphinx documentation
247
+ docs/_build/
248
+
249
+ # PyBuilder
250
+ .pybuilder/
251
+ target/
252
+
253
+ # Jupyter Notebook
254
+ .ipynb_checkpoints
255
+
256
+ # IPython
257
+ profile_default/
258
+ ipython_config.py
259
+
260
+ # pyenv
261
+ # For a library or package, you might want to ignore these files since the code is
262
+ # intended to run in multiple environments; otherwise, check them in:
263
+ # .python-version
264
+
265
+ # pipenv
266
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
267
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
268
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
269
+ # install all needed dependencies.
270
+ #Pipfile.lock
271
+
272
+ # poetry
273
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
274
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
275
+ # commonly ignored for libraries.
276
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
277
+ #poetry.lock
278
+
279
+ # pdm
280
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
281
+ #pdm.lock
282
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
283
+ # in version control.
284
+ # https://pdm.fming.dev/#use-with-ide
285
+ .pdm.toml
286
+
287
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
288
+ __pypackages__/
289
+
290
+ # Celery stuff
291
+ celerybeat-schedule
292
+ celerybeat.pid
293
+
294
+ # SageMath parsed files
295
+ *.sage.py
296
+
297
+ # Environments
298
+ .env
299
+ .venv
300
+ env/
301
+ venv/
302
+ ENV/
303
+ env.bak/
304
+ venv.bak/
305
+
306
+ # Spyder project settings
307
+ .spyderproject
308
+ .spyproject
309
+
310
+ # Rope project settings
311
+ .ropeproject
312
+
313
+ # mkdocs documentation
314
+ /site
315
+
316
+ # mypy
317
+ .mypy_cache/
318
+ .dmypy.json
319
+ dmypy.json
320
+
321
+ # Pyre type checker
322
+ .pyre/
323
+
324
+ # pytype static type analyzer
325
+ .pytype/
326
+
327
+ # Cython debug symbols
328
+ cython_debug/
329
+
330
+ # PyCharm
331
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
332
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
333
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
334
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
335
+ #.idea/
336
+
337
+ ### Python Patch ###
338
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
339
+ poetry.toml
340
+
341
+ # ruff
342
+ .ruff_cache/
343
+
344
+ # LSP config files
345
+ pyrightconfig.json
346
+
347
+ # End of https://www.toptal.com/developers/gitignore/api/python,pycharm,pycharm+all
.python-version ADDED
@@ -0,0 +1 @@
 
 
1
+ 3.11
app.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import requests
3
+
4
+
5
+ def get_price(coin_id):
6
+ url = f"https://api.coingecko.com/api/v3/simple/price?ids={coin_id}&vs_currencies=usd"
7
+ response = requests.get(url)
8
+ data = response.json()
9
+ if coin_id in data:
10
+ return f"{coin_id.capitalize()} price: ${data[coin_id]['usd']}"
11
+ return "Error fetching price."
12
+
13
+
14
+ coin_options = ["Bitcoin", "Ethereum", "Solana", "Dogecoin"]
15
+
16
+
17
+ with gr.Blocks() as app:
18
+ gr.Markdown("## Coin Price Checker")
19
+ coin = gr.Dropdown(choices=coin_options, label="Select a coin")
20
+ output = gr.Textbox(label="Price (USD)")
21
+ coin.change(fn=get_price, inputs=coin, outputs=output)
22
+
23
+
24
+ app.launch()
pyproject.toml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "mcp-gradio"
3
+ version = "0.1.0"
4
+ description = "Add your description here"
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ dependencies = [
8
+ "gradio>=5.30.0",
9
+ "requests>=2.32.3",
10
+ ]
uv.lock ADDED
The diff for this file is too large to render. See raw diff