Upload 3 files
Browse files- Dockerfile +7 -0
- README.md +5 -5
- fake.py +15 -0
Dockerfile
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ghcr.io/ggml-org/llama.cpp:full
|
| 2 |
+
|
| 3 |
+
RUN apt update && apt install wget -y
|
| 4 |
+
|
| 5 |
+
RUN wget "https://huggingface.co/unsloth/gemma-3-1b-it-GGUF/resolve/main/gemma-3-1b-it-Q8_0.gguf" -O /gemma-3-1b-it-Q8_0.gguf
|
| 6 |
+
|
| 7 |
+
CMD ["--server", "-m", "/gemma-3-1b-it-Q8_0.gguf", "--port", "7860", "--host", "0.0.0.0", "-n", "512"]
|
README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: gemma-3-1b-it
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: yellow
|
| 5 |
+
colorTo: red
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
|
| 10 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
fake.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import spaces
|
| 3 |
+
import transformers_gradio
|
| 4 |
+
|
| 5 |
+
demo = gr.load(name="google/gemma-3-1b-it", src=transformers_gradio.registry)
|
| 6 |
+
demo = gr.load(name="unsloth/gemma-3-1b-it-GGUF", src=transformers_gradio.registry)
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
demo.fn = spaces.GPU()(demo.fn)
|
| 10 |
+
|
| 11 |
+
for fn in demo.fns.values():
|
| 12 |
+
fn.api_name = False
|
| 13 |
+
|
| 14 |
+
if __name__ == "__main__":
|
| 15 |
+
demo.launch()
|