Spaces:
Runtime error
Runtime error
hanzla javaid
commited on
Commit
•
c66c032
1
Parent(s):
675eb84
first
Browse files- .idea/.gitignore +3 -0
- .idea/inspectionProfiles/Project_Default.xml +167 -0
- .idea/inspectionProfiles/profiles_settings.xml +6 -0
- .idea/misc.xml +7 -0
- .idea/modules.xml +8 -0
- .idea/test_comparison.iml +8 -0
- .idea/vcs.xml +6 -0
- app.py +14 -0
.idea/.gitignore
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
# Default ignored files
|
2 |
+
/shelf/
|
3 |
+
/workspace.xml
|
.idea/inspectionProfiles/Project_Default.xml
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<component name="InspectionProjectProfileManager">
|
2 |
+
<profile version="1.0">
|
3 |
+
<option name="myName" value="Project Default" />
|
4 |
+
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
5 |
+
<option name="ignoredPackages">
|
6 |
+
<value>
|
7 |
+
<list size="154">
|
8 |
+
<item index="0" class="java.lang.String" itemvalue="pywin32" />
|
9 |
+
<item index="1" class="java.lang.String" itemvalue="fastembed" />
|
10 |
+
<item index="2" class="java.lang.String" itemvalue="httpx" />
|
11 |
+
<item index="3" class="java.lang.String" itemvalue="pytweening" />
|
12 |
+
<item index="4" class="java.lang.String" itemvalue="exa-py" />
|
13 |
+
<item index="5" class="java.lang.String" itemvalue="PyMsgBox" />
|
14 |
+
<item index="6" class="java.lang.String" itemvalue="executing" />
|
15 |
+
<item index="7" class="java.lang.String" itemvalue="Pygments" />
|
16 |
+
<item index="8" class="java.lang.String" itemvalue="starlette" />
|
17 |
+
<item index="9" class="java.lang.String" itemvalue="PyPDF2" />
|
18 |
+
<item index="10" class="java.lang.String" itemvalue="uvicorn" />
|
19 |
+
<item index="11" class="java.lang.String" itemvalue="PyAutoGUI" />
|
20 |
+
<item index="12" class="java.lang.String" itemvalue="comm" />
|
21 |
+
<item index="13" class="java.lang.String" itemvalue="portalocker" />
|
22 |
+
<item index="14" class="java.lang.String" itemvalue="pydantic" />
|
23 |
+
<item index="15" class="java.lang.String" itemvalue="pyperclip" />
|
24 |
+
<item index="16" class="java.lang.String" itemvalue="python-engineio" />
|
25 |
+
<item index="17" class="java.lang.String" itemvalue="pexpect" />
|
26 |
+
<item index="18" class="java.lang.String" itemvalue="click" />
|
27 |
+
<item index="19" class="java.lang.String" itemvalue="ipykernel" />
|
28 |
+
<item index="20" class="java.lang.String" itemvalue="wsproto" />
|
29 |
+
<item index="21" class="java.lang.String" itemvalue="attrs" />
|
30 |
+
<item index="22" class="java.lang.String" itemvalue="psutil" />
|
31 |
+
<item index="23" class="java.lang.String" itemvalue="jedi" />
|
32 |
+
<item index="24" class="java.lang.String" itemvalue="openai" />
|
33 |
+
<item index="25" class="java.lang.String" itemvalue="pydantic_core" />
|
34 |
+
<item index="26" class="java.lang.String" itemvalue="asttokens" />
|
35 |
+
<item index="27" class="java.lang.String" itemvalue="platformdirs" />
|
36 |
+
<item index="28" class="java.lang.String" itemvalue="httpcore" />
|
37 |
+
<item index="29" class="java.lang.String" itemvalue="idna" />
|
38 |
+
<item index="30" class="java.lang.String" itemvalue="rsa" />
|
39 |
+
<item index="31" class="java.lang.String" itemvalue="decorator" />
|
40 |
+
<item index="32" class="java.lang.String" itemvalue="netifaces" />
|
41 |
+
<item index="33" class="java.lang.String" itemvalue="numpy" />
|
42 |
+
<item index="34" class="java.lang.String" itemvalue="pyasn1" />
|
43 |
+
<item index="35" class="java.lang.String" itemvalue="requests" />
|
44 |
+
<item index="36" class="java.lang.String" itemvalue="bidict" />
|
45 |
+
<item index="37" class="java.lang.String" itemvalue="sniffio" />
|
46 |
+
<item index="38" class="java.lang.String" itemvalue="exceptiongroup" />
|
47 |
+
<item index="39" class="java.lang.String" itemvalue="stack-data" />
|
48 |
+
<item index="40" class="java.lang.String" itemvalue="nest-asyncio" />
|
49 |
+
<item index="41" class="java.lang.String" itemvalue="tenacity" />
|
50 |
+
<item index="42" class="java.lang.String" itemvalue="PyScreeze" />
|
51 |
+
<item index="43" class="java.lang.String" itemvalue="uritemplate" />
|
52 |
+
<item index="44" class="java.lang.String" itemvalue="annotated-types" />
|
53 |
+
<item index="45" class="java.lang.String" itemvalue="hyperframe" />
|
54 |
+
<item index="46" class="java.lang.String" itemvalue="tornado" />
|
55 |
+
<item index="47" class="java.lang.String" itemvalue="google-auth-oauthlib" />
|
56 |
+
<item index="48" class="java.lang.String" itemvalue="pyasn1_modules" />
|
57 |
+
<item index="49" class="java.lang.String" itemvalue="aiofiles" />
|
58 |
+
<item index="50" class="java.lang.String" itemvalue="python-multipart" />
|
59 |
+
<item index="51" class="java.lang.String" itemvalue="hpack" />
|
60 |
+
<item index="52" class="java.lang.String" itemvalue="python3-xlib" />
|
61 |
+
<item index="53" class="java.lang.String" itemvalue="pandas" />
|
62 |
+
<item index="54" class="java.lang.String" itemvalue="watchdog" />
|
63 |
+
<item index="55" class="java.lang.String" itemvalue="typing_extensions" />
|
64 |
+
<item index="56" class="java.lang.String" itemvalue="cachetools" />
|
65 |
+
<item index="57" class="java.lang.String" itemvalue="debugpy" />
|
66 |
+
<item index="58" class="java.lang.String" itemvalue="multidict" />
|
67 |
+
<item index="59" class="java.lang.String" itemvalue="google-api-python-client" />
|
68 |
+
<item index="60" class="java.lang.String" itemvalue="yarl" />
|
69 |
+
<item index="61" class="java.lang.String" itemvalue="pytz" />
|
70 |
+
<item index="62" class="java.lang.String" itemvalue="PyGetWindow" />
|
71 |
+
<item index="63" class="java.lang.String" itemvalue="traitlets" />
|
72 |
+
<item index="64" class="java.lang.String" itemvalue="protobuf" />
|
73 |
+
<item index="65" class="java.lang.String" itemvalue="googleapis-common-protos" />
|
74 |
+
<item index="66" class="java.lang.String" itemvalue="jiter" />
|
75 |
+
<item index="67" class="java.lang.String" itemvalue="python-dateutil" />
|
76 |
+
<item index="68" class="java.lang.String" itemvalue="python-dotenv" />
|
77 |
+
<item index="69" class="java.lang.String" itemvalue="h11" />
|
78 |
+
<item index="70" class="java.lang.String" itemvalue="MarkupSafe" />
|
79 |
+
<item index="71" class="java.lang.String" itemvalue="frozenlist" />
|
80 |
+
<item index="72" class="java.lang.String" itemvalue="qdrant-client" />
|
81 |
+
<item index="73" class="java.lang.String" itemvalue="pyzmq" />
|
82 |
+
<item index="74" class="java.lang.String" itemvalue="certifi" />
|
83 |
+
<item index="75" class="java.lang.String" itemvalue="oauthlib" />
|
84 |
+
<item index="76" class="java.lang.String" itemvalue="anyio" />
|
85 |
+
<item index="77" class="java.lang.String" itemvalue="pyparsing" />
|
86 |
+
<item index="78" class="java.lang.String" itemvalue="google-api-core" />
|
87 |
+
<item index="79" class="java.lang.String" itemvalue="jupyter_client" />
|
88 |
+
<item index="80" class="java.lang.String" itemvalue="pure_eval" />
|
89 |
+
<item index="81" class="java.lang.String" itemvalue="aiohappyeyeballs" />
|
90 |
+
<item index="82" class="java.lang.String" itemvalue="python-socketio" />
|
91 |
+
<item index="83" class="java.lang.String" itemvalue="MouseInfo" />
|
92 |
+
<item index="84" class="java.lang.String" itemvalue="charset-normalizer" />
|
93 |
+
<item index="85" class="java.lang.String" itemvalue="distro" />
|
94 |
+
<item index="86" class="java.lang.String" itemvalue="simple-websocket" />
|
95 |
+
<item index="87" class="java.lang.String" itemvalue="matplotlib-inline" />
|
96 |
+
<item index="88" class="java.lang.String" itemvalue="async-timeout" />
|
97 |
+
<item index="89" class="java.lang.String" itemvalue="ptyprocess" />
|
98 |
+
<item index="90" class="java.lang.String" itemvalue="httplib2" />
|
99 |
+
<item index="91" class="java.lang.String" itemvalue="wcwidth" />
|
100 |
+
<item index="92" class="java.lang.String" itemvalue="h2" />
|
101 |
+
<item index="93" class="java.lang.String" itemvalue="jupyter_core" />
|
102 |
+
<item index="94" class="java.lang.String" itemvalue="Jinja2" />
|
103 |
+
<item index="95" class="java.lang.String" itemvalue="requests-oauthlib" />
|
104 |
+
<item index="96" class="java.lang.String" itemvalue="google-auth-httplib2" />
|
105 |
+
<item index="97" class="java.lang.String" itemvalue="urllib3" />
|
106 |
+
<item index="98" class="java.lang.String" itemvalue="six" />
|
107 |
+
<item index="99" class="java.lang.String" itemvalue="prompt_toolkit" />
|
108 |
+
<item index="100" class="java.lang.String" itemvalue="parso" />
|
109 |
+
<item index="101" class="java.lang.String" itemvalue="tzdata" />
|
110 |
+
<item index="102" class="java.lang.String" itemvalue="ipython" />
|
111 |
+
<item index="103" class="java.lang.String" itemvalue="packaging" />
|
112 |
+
<item index="104" class="java.lang.String" itemvalue="grpcio-tools" />
|
113 |
+
<item index="105" class="java.lang.String" itemvalue="tqdm" />
|
114 |
+
<item index="106" class="java.lang.String" itemvalue="schedule" />
|
115 |
+
<item index="107" class="java.lang.String" itemvalue="fastapi" />
|
116 |
+
<item index="108" class="java.lang.String" itemvalue="proto-plus" />
|
117 |
+
<item index="109" class="java.lang.String" itemvalue="pillow" />
|
118 |
+
<item index="110" class="java.lang.String" itemvalue="aiohttp" />
|
119 |
+
<item index="111" class="java.lang.String" itemvalue="grpcio" />
|
120 |
+
<item index="112" class="java.lang.String" itemvalue="aiosignal" />
|
121 |
+
<item index="113" class="java.lang.String" itemvalue="PyRect" />
|
122 |
+
<item index="114" class="java.lang.String" itemvalue="google-auth" />
|
123 |
+
<item index="115" class="java.lang.String" itemvalue="huggingface-hub" />
|
124 |
+
<item index="116" class="java.lang.String" itemvalue="PyYAML" />
|
125 |
+
<item index="117" class="java.lang.String" itemvalue="setuptools" />
|
126 |
+
<item index="118" class="java.lang.String" itemvalue="httptools" />
|
127 |
+
<item index="119" class="java.lang.String" itemvalue="markdown-it-py" />
|
128 |
+
<item index="120" class="java.lang.String" itemvalue="snowballstemmer" />
|
129 |
+
<item index="121" class="java.lang.String" itemvalue="fsspec" />
|
130 |
+
<item index="122" class="java.lang.String" itemvalue="google-generativeai" />
|
131 |
+
<item index="123" class="java.lang.String" itemvalue="onnxruntime" />
|
132 |
+
<item index="124" class="java.lang.String" itemvalue="filelock" />
|
133 |
+
<item index="125" class="java.lang.String" itemvalue="mdurl" />
|
134 |
+
<item index="126" class="java.lang.String" itemvalue="mmh3" />
|
135 |
+
<item index="127" class="java.lang.String" itemvalue="grpcio-status" />
|
136 |
+
<item index="128" class="java.lang.String" itemvalue="pyreadline3" />
|
137 |
+
<item index="129" class="java.lang.String" itemvalue="onnx" />
|
138 |
+
<item index="130" class="java.lang.String" itemvalue="sympy" />
|
139 |
+
<item index="131" class="java.lang.String" itemvalue="websockets" />
|
140 |
+
<item index="132" class="java.lang.String" itemvalue="tokenizers" />
|
141 |
+
<item index="133" class="java.lang.String" itemvalue="watchfiles" />
|
142 |
+
<item index="134" class="java.lang.String" itemvalue="PyStemmer" />
|
143 |
+
<item index="135" class="java.lang.String" itemvalue="fastapi-cli" />
|
144 |
+
<item index="136" class="java.lang.String" itemvalue="pymongo" />
|
145 |
+
<item index="137" class="java.lang.String" itemvalue="typer" />
|
146 |
+
<item index="138" class="java.lang.String" itemvalue="rich" />
|
147 |
+
<item index="139" class="java.lang.String" itemvalue="humanfriendly" />
|
148 |
+
<item index="140" class="java.lang.String" itemvalue="loguru" />
|
149 |
+
<item index="141" class="java.lang.String" itemvalue="coloredlogs" />
|
150 |
+
<item index="142" class="java.lang.String" itemvalue="flatbuffers" />
|
151 |
+
<item index="143" class="java.lang.String" itemvalue="google-ai-generativelanguage" />
|
152 |
+
<item index="144" class="java.lang.String" itemvalue="colorama" />
|
153 |
+
<item index="145" class="java.lang.String" itemvalue="mpmath" />
|
154 |
+
<item index="146" class="java.lang.String" itemvalue="email_validator" />
|
155 |
+
<item index="147" class="java.lang.String" itemvalue="shellingham" />
|
156 |
+
<item index="148" class="java.lang.String" itemvalue="beautifulsoup4" />
|
157 |
+
<item index="149" class="java.lang.String" itemvalue="ecdsa" />
|
158 |
+
<item index="150" class="java.lang.String" itemvalue="soupsieve" />
|
159 |
+
<item index="151" class="java.lang.String" itemvalue="google" />
|
160 |
+
<item index="152" class="java.lang.String" itemvalue="python-jose" />
|
161 |
+
<item index="153" class="java.lang.String" itemvalue="passlib" />
|
162 |
+
</list>
|
163 |
+
</value>
|
164 |
+
</option>
|
165 |
+
</inspection_tool>
|
166 |
+
</profile>
|
167 |
+
</component>
|
.idea/inspectionProfiles/profiles_settings.xml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<component name="InspectionProjectProfileManager">
|
2 |
+
<settings>
|
3 |
+
<option name="USE_PROJECT_PROFILE" value="false" />
|
4 |
+
<version value="1.0" />
|
5 |
+
</settings>
|
6 |
+
</component>
|
.idea/misc.xml
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<project version="4">
|
3 |
+
<component name="Black">
|
4 |
+
<option name="sdkName" value="Python 3.12 (elsa-core)" />
|
5 |
+
</component>
|
6 |
+
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 (elsa-core)" project-jdk-type="Python SDK" />
|
7 |
+
</project>
|
.idea/modules.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<project version="4">
|
3 |
+
<component name="ProjectModuleManager">
|
4 |
+
<modules>
|
5 |
+
<module fileurl="file://$PROJECT_DIR$/.idea/test_comparison.iml" filepath="$PROJECT_DIR$/.idea/test_comparison.iml" />
|
6 |
+
</modules>
|
7 |
+
</component>
|
8 |
+
</project>
|
.idea/test_comparison.iml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<module type="PYTHON_MODULE" version="4">
|
3 |
+
<component name="NewModuleRootManager">
|
4 |
+
<content url="file://$MODULE_DIR$" />
|
5 |
+
<orderEntry type="inheritedJdk" />
|
6 |
+
<orderEntry type="sourceFolder" forTests="false" />
|
7 |
+
</component>
|
8 |
+
</module>
|
.idea/vcs.xml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<project version="4">
|
3 |
+
<component name="VcsDirectoryMappings">
|
4 |
+
<mapping directory="" vcs="Git" />
|
5 |
+
</component>
|
6 |
+
</project>
|
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import spaces
|
3 |
+
import torch
|
4 |
+
|
5 |
+
zero = torch.Tensor([0]).cuda()
|
6 |
+
print(zero.device) # <-- 'cpu' 🤔
|
7 |
+
|
8 |
+
@spaces.GPU
|
9 |
+
def greet(n):
|
10 |
+
print(zero.device) # <-- 'cuda:0' 🤗
|
11 |
+
return f"Hello {zero + n} Tensor"
|
12 |
+
|
13 |
+
demo = gr.Interface(fn=greet, inputs=gr.Number(), outputs=gr.Text())
|
14 |
+
demo.launch()
|