amkyawdev commited on
Commit
4d3df66
·
verified ·
1 Parent(s): c946914

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +63 -12
  2. app.py +42 -0
  3. requirements.txt +2 -0
README.md CHANGED
@@ -1,12 +1,63 @@
1
- ---
2
- title: Amkyaw Coder
3
- emoji: 🦀
4
- colorFrom: blue
5
- colorTo: yellow
6
- sdk: gradio
7
- sdk_version: 6.12.0
8
- app_file: app.py
9
- pinned: false
10
- ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # amkyawdev/amkyaw-dev-v1
2
+
3
+ ## Model Overview
4
+
5
+ - **Model Name**: amkyaw-coder-1.5b-instruct
6
+ - **Type**: Code Generation / Instruction Following
7
+ - **Size**: 1.5B parameters
8
+ - **Format**: GGUF (quantized)
9
+
10
+ ## Quick Start
11
+
12
+ ```bash
13
+ # Run the model
14
+ ollama run amkyawdev/amkyaw-dev-v1
15
+
16
+ # Or run with specific tag
17
+ ollama run amkyawdev/amkyaw-dev-v1:latest
18
+ ```
19
+
20
+ ## Features
21
+
22
+ - Code generation
23
+ - Instruction following
24
+ - Burmese language support
25
+ - English language support
26
+
27
+ ## System Requirements
28
+
29
+ - Ollama installed
30
+ - At least 2GB RAM available
31
+ - No GPU required (runs on CPU)
32
+
33
+ ## Configuration
34
+
35
+ | Parameter | Value |
36
+ |-----------|-------|
37
+ | Temperature | 0.8 |
38
+ | Top P | 0.9 |
39
+ | Top K | 40 |
40
+ | Context Length | 4096 |
41
+
42
+ ## Usage Examples
43
+
44
+ ```python
45
+ import ollama
46
+
47
+ response = ollama.generate(
48
+ model='amkyawdev/amkyaw-dev-v1',
49
+ prompt='Write a Python function to calculate factorial'
50
+ )
51
+ print(response['response'])
52
+ ```
53
+
54
+ ## License
55
+
56
+ See [Hugging Face](https://huggingface.co/amkyawdev/amkyaw-dev-v1) for license information.
57
+
58
+ ## Troubleshooting
59
+
60
+ If you encounter issues:
61
+ 1. Make sure Ollama is running: `ollama serve`
62
+ 2. Check model is installed: `ollama list`
63
+ 3. Try restarting Ollama: `pkill ollama && ollama serve`
app.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import ollama
3
+ import os
4
+
5
+ def generate(prompt, temperature=0.8, max_tokens=512):
6
+ try:
7
+ response = ollama.generate(
8
+ model='amkyawdev/amkyaw-dev-v1',
9
+ prompt=prompt,
10
+ options={
11
+ 'temperature': temperature,
12
+ 'num_predict': max_tokens
13
+ }
14
+ )
15
+ return response['response']
16
+ except Exception as e:
17
+ return f"Error: {str(e)}"
18
+
19
+ # Check if Ollama is accessible
20
+ try:
21
+ ollama.list()
22
+ status = "✅ Ollama is running"
23
+ except:
24
+ status = "❌ Ollama is not running"
25
+
26
+ with gr.Blocks(title="amkyaw-coder") as demo:
27
+ gr.Markdown(f"# amkyaw-coder-1.5b-instruct\n{status}")
28
+
29
+ with gr.Row():
30
+ with gr.Column():
31
+ prompt = gr.Textbox(label="Prompt", lines=4, placeholder="Enter your prompt here...")
32
+ temperature = gr.Slider(0.1, 2.0, value=0.8, step=0.1, label="Temperature")
33
+ max_tokens = gr.Slider(64, 2048, value=512, step=64, label="Max Tokens")
34
+ submit = gr.Button("Generate", variant="primary")
35
+
36
+ with gr.Column():
37
+ output = gr.Textbox(label="Output", lines=15)
38
+
39
+ submit.click(generate, inputs=[prompt, temperature, max_tokens], outputs=output)
40
+
41
+ if __name__ == "__main__":
42
+ demo.launch(server_name="0.0.0.0", server_port=7860)
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ gradio>=4.0.0
2
+ ollama>=0.1.0