Bbkblo commited on
Commit
a236d79
·
verified ·
1 Parent(s): 26419f9

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +185 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Wz
3
- emoji: 📊
4
- colorFrom: indigo
5
- colorTo: yellow
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: wz
3
+ emoji: 🐳
4
+ colorFrom: green
5
+ colorTo: blue
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,185 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Dvid Project Structure</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <style>
9
+ .file-tree {
10
+ font-family: 'Courier New', monospace;
11
+ background-color: #f8f9fa;
12
+ padding: 20px;
13
+ border-radius: 8px;
14
+ margin-bottom: 20px;
15
+ }
16
+ .folder {
17
+ color: #1a73e8;
18
+ font-weight: bold;
19
+ }
20
+ .file {
21
+ color: #34a853;
22
+ margin-left: 20px;
23
+ }
24
+ .file-content {
25
+ background-color: #f1f3f4;
26
+ padding: 15px;
27
+ border-radius: 6px;
28
+ margin-top: 10px;
29
+ overflow-x: auto;
30
+ }
31
+ .section-title {
32
+ color: #5f6368;
33
+ border-bottom: 1px solid #dadce0;
34
+ padding-bottom: 8px;
35
+ margin-top: 30px;
36
+ }
37
+ </style>
38
+ </head>
39
+ <body class="bg-gray-50 p-8">
40
+ <div class="max-w-6xl mx-auto">
41
+ <h1 class="text-3xl font-bold text-gray-800 mb-6">Dvid Android Project Structure</h1>
42
+
43
+ <div class="bg-white rounded-lg shadow-md p-6 mb-8">
44
+ <h2 class="text-xl font-semibold text-gray-700 mb-4">Project Specifications</h2>
45
+ <ul class="list-disc pl-6 text-gray-600">
46
+ <li><span class="font-medium">Project Name:</span> Dvid</li>
47
+ <li><span class="font-medium">Package Name:</span> com.example.dvid</li>
48
+ <li><span class="font-medium">Minimum SDK:</span> 21 (Android 5.0 Lollipop)</li>
49
+ <li><span class="font-medium">Language:</span> Java</li>
50
+ <li><span class="font-medium">Features:</span> Whisper.cpp with NDK support</li>
51
+ </ul>
52
+ </div>
53
+
54
+ <h2 class="section-title text-2xl">Complete Project Structure</h2>
55
+ <div class="file-tree">
56
+ <div class="folder">Dvid/</div>
57
+ <div class="file">.gitignore</div>
58
+ <div class="file">build.gradle (Project-level)</div>
59
+ <div class="file">settings.gradle</div>
60
+ <div class="file">gradle.properties</div>
61
+
62
+ <div class="folder">app/</div>
63
+ <div class="file">build.gradle (Module-level)</div>
64
+ <div class="file">proguard-rules.pro</div>
65
+
66
+ <div class="folder">src/</div>
67
+ <div class="folder">main/</div>
68
+ <div class="file">AndroidManifest.xml</div>
69
+
70
+ <div class="folder">java/com/example/dvid/</div>
71
+ <div class="file">MainActivity.java</div>
72
+ <div class="file">WhisperJNI.java (JNI interface)</div>
73
+
74
+ <div class="folder">jni/</div>
75
+ <div class="file">Android.mk</div>
76
+ <div class="file">Application.mk</div>
77
+ <div class="file">CMakeLists.txt</div>
78
+ <div class="folder">whisper.cpp/ (full whisper.cpp library)</div>
79
+
80
+ <div class="folder">assets/</div>
81
+ <div class="file">ggml-base.en.bin (Whisper model)</div>
82
+
83
+ <div class="folder">res/</div>
84
+ <div class="folder">drawable/</div>
85
+ <div class="file">ic_launcher.png (app icon)</div>
86
+ <div class="file">ic_mic.png (microphone icon)</div>
87
+
88
+ <div class="folder">layout/</div>
89
+ <div class="file">activity_main.xml</div>
90
+
91
+ <div class="folder">values/</div>
92
+ <div class="file">strings.xml</div>
93
+ <div class="file">colors.xml</div>
94
+ <div class="file">styles.xml</div>
95
+
96
+ <div class="folder">gradle/</div>
97
+ <div class="folder">wrapper/</div>
98
+ <div class="file">gradle-wrapper.jar</div>
99
+ <div class="file">gradle-wrapper.properties</div>
100
+ </div>
101
+
102
+ <h2 class="section-title text-2xl">Key File Contents</h2>
103
+
104
+ <div class="mb-8">
105
+ <h3 class="text-lg font-medium text-gray-700 mb-2">app/build.gradle</h3>
106
+ <div class="file-content">
107
+ <pre>
108
+ apply plugin: 'com.android.application'
109
+
110
+ android {
111
+ compileSdkVersion 33
112
+ defaultConfig {
113
+ applicationId "com.example.dvid"
114
+ minSdkVersion 21
115
+ targetSdkVersion 33
116
+ versionCode 1
117
+ versionName "1.0"
118
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
119
+ externalNativeBuild {
120
+ cmake {
121
+ cppFlags "-std=c++17"
122
+ arguments "-DANDROID_STL=c++_shared"
123
+ }
124
+ }
125
+ ndk {
126
+ abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
127
+ }
128
+ }
129
+ buildTypes {
130
+ release {
131
+ minifyEnabled false
132
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
133
+ }
134
+ }
135
+ externalNativeBuild {
136
+ cmake {
137
+ path "src/main/jni/CMakeLists.txt"
138
+ version "3.22.1"
139
+ }
140
+ }
141
+ sourceSets {
142
+ main {
143
+ assets.srcDirs = ['src/main/assets']
144
+ jniLibs.srcDirs = ['src/main/jniLibs']
145
+ }
146
+ }
147
+ }
148
+
149
+ dependencies {
150
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
151
+ implementation 'androidx.appcompat:appcompat:1.6.1'
152
+ implementation 'com.google.android.material:material:1.9.0'
153
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
154
+ testImplementation 'junit:junit:4.13.2'
155
+ androidTestImplementation 'androidx.test.ext:junit:1.1.5'
156
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
157
+ }</pre>
158
+ </div>
159
+ </div>
160
+
161
+ <div class="mb-8">
162
+ <h3 class="text-lg font-medium text-gray-700 mb-2">AndroidManifest.xml</h3>
163
+ <div class="file-content">
164
+ <pre>
165
+ &lt;?xml version="1.0" encoding="utf-8"?&gt;
166
+ &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
167
+ package="com.example.dvid"&gt;
168
+
169
+ &lt;uses-permission android:name="android.permission.RECORD_AUDIO" /&gt;
170
+ &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
171
+ &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /&gt;
172
+
173
+ &lt;application
174
+ android:allowBackup="true"
175
+ android:icon="@drawable/ic_launcher"
176
+ android:label="@string/app_name"
177
+ android:roundIcon="@drawable/ic_launcher_round"
178
+ android:supportsRtl="true"
179
+ android:theme="@style/AppTheme"&gt;
180
+ &lt;activity android:name=".MainActivity"&gt;
181
+ &lt;intent-filter&gt;
182
+ &lt;action android:name="android.intent.action.MAIN" /&gt;
183
+ &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
184
+
185
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Mujhe ek Android Studio project ka complete folder structure generate karke do jisme: 1. **Project ka naam:** Dvid 2. **Package name:** com.example.dvid 3. **Minimum SDK:** 21 4. **Language:** Java 5. **Whisper.cpp ka Android NDK support included ho** 6. `jni/` folder ke andar whisper.cpp aur uska CMakeLists.txt ho 7. Java ke andar ek MainActivity.java ho jo JNI se native function call kare 8. Ek assets folder ho jisme model file (ggml-base.en.bin) rakha jaye 9. Gradle build files bhi ho (build.gradle, settings.gradle) 10. Ek AndroidManifest.xml ho 11. App ka ek simple UI ho jisme ek button ho — "Start Recording" ke liye 12. App ka icon bhi placeholder ho 13. `res/values/strings.xml` aur `res/layout/activity_main.xml` bhi ho Mujhe project ka pura folder aur file tree structure path ke sath do, jisme file ka naam aur uska kaam likha ho. Agar ho sake toh important files ka short content bhi de do. Bas ye project Android Studio compatible hona chahiye.