Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- .idea/.gitignore +8 -0
- .idea/digit_recognizer.iml +11 -0
- .idea/git_toolbox_prj.xml +15 -0
- .idea/inspectionProfiles/Project_Default.xml +27 -0
- .idea/inspectionProfiles/profiles_settings.xml +6 -0
- .idea/jupyter-settings.xml +17 -0
- .idea/misc.xml +11 -0
- .idea/modules.xml +8 -0
- .idea/vcs.xml +6 -0
- .idea/workspace.xml +93 -0
- model.keras +3 -0
- tt.py +19 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
*.keras filter=lfs diff=lfs merge=lfs -text
|
.idea/.gitignore
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Default ignored files
|
2 |
+
/shelf/
|
3 |
+
/workspace.xml
|
4 |
+
# Editor-based HTTP Client requests
|
5 |
+
/httpRequests/
|
6 |
+
# Datasource local storage ignored files
|
7 |
+
/dataSources/
|
8 |
+
/dataSources.local.xml
|
.idea/digit_recognizer.iml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
<component name="SonarLintModuleSettings">
|
9 |
+
<option name="uniqueId" value="d6f421f4-3849-4b13-bd8b-48396c15cf68" />
|
10 |
+
</component>
|
11 |
+
</module>
|
.idea/git_toolbox_prj.xml
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<project version="4">
|
3 |
+
<component name="GitToolBoxProjectSettings">
|
4 |
+
<option name="commitMessageIssueKeyValidationOverride">
|
5 |
+
<BoolValueOverride>
|
6 |
+
<option name="enabled" value="true" />
|
7 |
+
</BoolValueOverride>
|
8 |
+
</option>
|
9 |
+
<option name="commitMessageValidationEnabledOverride">
|
10 |
+
<BoolValueOverride>
|
11 |
+
<option name="enabled" value="true" />
|
12 |
+
</BoolValueOverride>
|
13 |
+
</option>
|
14 |
+
</component>
|
15 |
+
</project>
|
.idea/inspectionProfiles/Project_Default.xml
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<component name="InspectionProjectProfileManager">
|
2 |
+
<profile version="1.0">
|
3 |
+
<option name="myName" value="Project Default" />
|
4 |
+
<inspection_tool class="DuplicatedCode" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
5 |
+
<Languages>
|
6 |
+
<language minSize="151" name="Python" />
|
7 |
+
</Languages>
|
8 |
+
</inspection_tool>
|
9 |
+
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
10 |
+
<option name="ignoredErrors">
|
11 |
+
<list>
|
12 |
+
<option value="N802" />
|
13 |
+
<option value="N803" />
|
14 |
+
<option value="N806" />
|
15 |
+
</list>
|
16 |
+
</option>
|
17 |
+
</inspection_tool>
|
18 |
+
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
19 |
+
<option name="ignoredIdentifiers">
|
20 |
+
<list>
|
21 |
+
<option value="flet.page.clean" />
|
22 |
+
<option value="flet.page.close" />
|
23 |
+
</list>
|
24 |
+
</option>
|
25 |
+
</inspection_tool>
|
26 |
+
</profile>
|
27 |
+
</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/jupyter-settings.xml
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<project version="4">
|
3 |
+
<component name="JupyterPersistentConnectionParameters">
|
4 |
+
<option name="moduleParameters">
|
5 |
+
<map>
|
6 |
+
<entry key="$PROJECT_DIR$/../h/.idea/h.iml">
|
7 |
+
<value>
|
8 |
+
<JupyterConnectionParameters>
|
9 |
+
<option name="managed" value="true" />
|
10 |
+
<option name="sdkHomePath" value="C:\Users\moham\anaconda3\python.exe" />
|
11 |
+
</JupyterConnectionParameters>
|
12 |
+
</value>
|
13 |
+
</entry>
|
14 |
+
</map>
|
15 |
+
</option>
|
16 |
+
</component>
|
17 |
+
</project>
|
.idea/misc.xml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<project version="4">
|
3 |
+
<component name="Black">
|
4 |
+
<option name="sdkName" value="Anaconda" />
|
5 |
+
</component>
|
6 |
+
<component name="DiscordProjectSettings">
|
7 |
+
<option name="show" value="ASK" />
|
8 |
+
<option name="description" value="" />
|
9 |
+
</component>
|
10 |
+
<component name="ProjectRootManager" version="2" project-jdk-name="Anaconda" project-jdk-type="Python SDK" />
|
11 |
+
</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/digit_recognizer.iml" filepath="$PROJECT_DIR$/.idea/digit_recognizer.iml" />
|
6 |
+
</modules>
|
7 |
+
</component>
|
8 |
+
</project>
|
.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>
|
.idea/workspace.xml
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<project version="4">
|
3 |
+
<component name="AutoImportSettings">
|
4 |
+
<option name="autoReloadType" value="SELECTIVE" />
|
5 |
+
</component>
|
6 |
+
<component name="ChangeListManager">
|
7 |
+
<list default="true" id="c2ae8f81-c460-428e-88d2-fb409928f04a" name="Changes" comment="">
|
8 |
+
<change beforePath="$PROJECT_DIR$/.gitattributes" beforeDir="false" afterPath="$PROJECT_DIR$/.gitattributes" afterDir="false" />
|
9 |
+
<change beforePath="$PROJECT_DIR$/model.keras" beforeDir="false" afterPath="$PROJECT_DIR$/model.keras" afterDir="false" />
|
10 |
+
<change beforePath="$PROJECT_DIR$/tt.py" beforeDir="false" afterPath="$PROJECT_DIR$/tt.py" afterDir="false" />
|
11 |
+
</list>
|
12 |
+
<option name="SHOW_DIALOG" value="false" />
|
13 |
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
14 |
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
15 |
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
16 |
+
</component>
|
17 |
+
<component name="CodyActiveAccount">
|
18 |
+
<option name="activeAccountId" value="8ec16ead-6157-47db-a3da-b9996dc8acfb" />
|
19 |
+
</component>
|
20 |
+
<component name="FlaskConsoleOptions" custom-start-script="import sys sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS]) from flask.cli import ScriptInfo locals().update(ScriptInfo(create_app=None).load_app().make_shell_context()) print("Python %s on %s\nApp: %s [%s]\nInstance: %s" % (sys.version, sys.platform, app.import_name, app.env, app.instance_path))">
|
21 |
+
<envs>
|
22 |
+
<env key="FLASK_APP" value="app" />
|
23 |
+
</envs>
|
24 |
+
<option name="myCustomStartScript" value="import sys sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS]) from flask.cli import ScriptInfo locals().update(ScriptInfo(create_app=None).load_app().make_shell_context()) print("Python %s on %s\nApp: %s [%s]\nInstance: %s" % (sys.version, sys.platform, app.import_name, app.env, app.instance_path))" />
|
25 |
+
<option name="myEnvs">
|
26 |
+
<map>
|
27 |
+
<entry key="FLASK_APP" value="app" />
|
28 |
+
</map>
|
29 |
+
</option>
|
30 |
+
</component>
|
31 |
+
<component name="Git.Settings">
|
32 |
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
33 |
+
</component>
|
34 |
+
<component name="ProjectColorInfo"><![CDATA[{
|
35 |
+
"associatedIndex": 0
|
36 |
+
}]]></component>
|
37 |
+
<component name="ProjectId" id="2WTojUCzm52hi8UKNMzfYeaDxWA" />
|
38 |
+
<component name="ProjectViewState">
|
39 |
+
<option name="hideEmptyMiddlePackages" value="true" />
|
40 |
+
<option name="showLibraryContents" value="true" />
|
41 |
+
<option name="showMembers" value="true" />
|
42 |
+
</component>
|
43 |
+
<component name="PropertiesComponent"><![CDATA[{
|
44 |
+
"keyToString": {
|
45 |
+
"RunOnceActivity.CodyProjectSettingsMigration": "true",
|
46 |
+
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
47 |
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
48 |
+
"SONARLINT_PRECOMMIT_ANALYSIS": "true",
|
49 |
+
"WebServerToolWindowFactoryState": "false",
|
50 |
+
"dart.analysis.tool.window.visible": "false",
|
51 |
+
"git-widget-placeholder": "main",
|
52 |
+
"ignore_missing_gitignore": "true",
|
53 |
+
"last_opened_file_path": "C:/Users/moham/Desktop/digit_recognizer",
|
54 |
+
"node.js.detected.package.eslint": "true",
|
55 |
+
"node.js.detected.package.tslint": "true",
|
56 |
+
"node.js.selected.package.eslint": "(autodetect)",
|
57 |
+
"node.js.selected.package.tslint": "(autodetect)",
|
58 |
+
"settings.editor.selected.configurable": "preferences.pluginManager",
|
59 |
+
"vue.rearranger.settings.migration": "true"
|
60 |
+
}
|
61 |
+
}]]></component>
|
62 |
+
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
63 |
+
<component name="TaskManager">
|
64 |
+
<task active="true" id="Default" summary="Default task">
|
65 |
+
<changelist id="c2ae8f81-c460-428e-88d2-fb409928f04a" name="Changes" comment="" />
|
66 |
+
<created>1696766069575</created>
|
67 |
+
<option name="number" value="Default" />
|
68 |
+
<option name="presentableId" value="Default" />
|
69 |
+
<updated>1696766069575</updated>
|
70 |
+
<workItem from="1696766070562" duration="2321000" />
|
71 |
+
</task>
|
72 |
+
<task id="LOCAL-00001" summary="done">
|
73 |
+
<option name="closed" value="true" />
|
74 |
+
<created>1696766172999</created>
|
75 |
+
<option name="number" value="00001" />
|
76 |
+
<option name="presentableId" value="LOCAL-00001" />
|
77 |
+
<option name="project" value="LOCAL" />
|
78 |
+
<updated>1696766172999</updated>
|
79 |
+
</task>
|
80 |
+
<option name="localTasksCounter" value="2" />
|
81 |
+
<servers />
|
82 |
+
</component>
|
83 |
+
<component name="TypeScriptGeneratedFilesManager">
|
84 |
+
<option name="version" value="3" />
|
85 |
+
</component>
|
86 |
+
<component name="VcsManagerConfiguration">
|
87 |
+
<MESSAGE value="done" />
|
88 |
+
<option name="LAST_COMMIT_MESSAGE" value="done" />
|
89 |
+
</component>
|
90 |
+
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
91 |
+
<SUITE FILE_PATH="coverage/digit_recognizer$tt.coverage" NAME="tt Coverage Results" MODIFIED="1696767956607" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
92 |
+
</component>
|
93 |
+
</project>
|
model.keras
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ea3a54013fecceb743d158614bdce0842d1744333f44727f15fb31605fa66a0a
|
3 |
+
size 1240663
|
tt.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import keras
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
model = keras.models.load_model("model.keras")
|
5 |
+
|
6 |
+
|
7 |
+
def recognize_digit(img):
|
8 |
+
img = img.reshape(1, 784)
|
9 |
+
img = img / 255
|
10 |
+
prediction = model.predict(img).tolist()[0]
|
11 |
+
return {str(i): prediction[i] for i in range(10)}
|
12 |
+
|
13 |
+
|
14 |
+
gr.Interface(
|
15 |
+
recognize_digit,
|
16 |
+
inputs=gr.Sketchpad(),
|
17 |
+
outputs=gr.Label(),
|
18 |
+
title="Predict from 0 to 9",
|
19 |
+
).launch()
|