File size: 1,559 Bytes
470f6bb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
title: FAQ-Finetuning
emoji: πŸŽ“
colorFrom: blue
colorTo: green
sdk: docker
app_file: app.py
pinned: false
---

# Gemma νŒŒμΈνŠœλ‹ λͺ¨λΈ API

μˆ˜ν—˜μƒ Q&Aλ₯Ό μœ„ν•΄ νŒŒμΈνŠœλ‹λœ Google Gemma 2 λͺ¨λΈμž…λ‹ˆλ‹€.

## πŸš€ μ‚¬μš© 방법

### API μ—”λ“œν¬μΈνŠΈ

- **POST /predict** - μ§ˆλ¬Έμ— λ‹΅λ³€
- **GET /health** - μ„œλ²„ μƒνƒœ 확인
- **GET /docs** - API λ¬Έμ„œ (Swagger UI)

### μ‚¬μš© 예제

#### Python
```python
import requests

response = requests.post(
    "https://huggingface.co/spaces/CSmart-AI/FAQ-Finetuning",
    json={"question": "μ˜€λ‹΅λ…ΈνŠΈλŠ” μ–΄λ–»κ²Œ μ •λ¦¬ν• κΉŒμš”?"}
)

print(response.json()['answer'])
```

#### cURL
```bash
curl -X POST "https://huggingface.co/spaces/CSmart-AI/FAQ-Finetuning/predict" \
  -H "Content-Type: application/json" \
  -d '{"question": "μ˜€λ‹΅λ…ΈνŠΈλŠ” μ–΄λ–»κ²Œ μ •λ¦¬ν• κΉŒμš”?"}'
```

#### JavaScript
```javascript
const response = await fetch('https://huggingface.co/spaces/CSmart-AI/FAQ-Finetuning/predict', {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({question: "μ˜€λ‹΅λ…ΈνŠΈλŠ” μ–΄λ–»κ²Œ μ •λ¦¬ν• κΉŒμš”?"})
});

const result = await response.json();
console.log(result.answer);
```

## πŸ“Š λͺ¨λΈ 정보

- **베이슀 λͺ¨λΈ**: Google Gemma 2B
- **νŒŒμΈνŠœλ‹**: LoRA (Low-Rank Adaptation)
- **ν•™μŠ΅ 데이터**: μˆ˜ν—˜μƒ Q&A 데이터셋
- **μš©λ„**: ν•™μŠ΅ κ΄€λ ¨ 질문 λ‹΅λ³€

## 🎯 μ£Όμš” κΈ°λŠ₯

- ν•™μŠ΅ 방법 μ‘°μ–Έ
- 곡뢀 κ³„νš 수립
- κ³Όλͺ©λ³„ ν•™μŠ΅ μ „λž΅
- μ‹œν—˜ μ€€λΉ„ 팁

## πŸ“ License

MIT License