jacob-c commited on
Commit
8f3823a
·
verified ·
1 Parent(s): c493050

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +39 -0
README.md CHANGED
@@ -9,6 +9,12 @@ tags:
9
  - music
10
  datasets:
11
  - smgriffin/modern-pop-lyrics
 
 
 
 
 
 
12
  ---
13
 
14
  # GPT-Neo 2.7B LoRA Fine-tuned for Lyrics Generation
@@ -44,6 +50,39 @@ This happens transparently - you don't need to handle the base model separately.
44
 
45
  ## How to Use
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  You can use this model to generate lyrics in the style of different artists. Here's a simple example:
48
 
49
  ```python
 
9
  - music
10
  datasets:
11
  - smgriffin/modern-pop-lyrics
12
+ pipeline_tag: text-generation
13
+ widget:
14
+ - text: "Artist: Taylor Swift\nLyrics:"
15
+ - text: "Artist: Beyonce\nLyrics:"
16
+ - text: "Artist: Drake\nLyrics:"
17
+ inference: true
18
  ---
19
 
20
  # GPT-Neo 2.7B LoRA Fine-tuned for Lyrics Generation
 
50
 
51
  ## How to Use
52
 
53
+ ### Using the Inference API
54
+
55
+ The easiest way to try this model is through the Hugging Face Inference API. You can use:
56
+
57
+ 1. **The web interface**: Try the examples in the widget at the top of this page
58
+ 2. **API calls**: Use the Inference API with your HF token
59
+
60
+ ```python
61
+ import requests
62
+
63
+ API_URL = "https://api-inference.huggingface.co/models/jacob-c/gptneo-2.7Bloratunning"
64
+ headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}
65
+
66
+ def query(payload):
67
+ response = requests.post(API_URL, headers=headers, json=payload)
68
+ return response.json()
69
+
70
+ # Example: Generate lyrics for Taylor Swift
71
+ output = query({
72
+ "inputs": "Artist: Taylor Swift\nLyrics:",
73
+ "parameters": {
74
+ "max_length": 200,
75
+ "temperature": 0.7,
76
+ "top_p": 0.9,
77
+ "top_k": 50
78
+ }
79
+ })
80
+
81
+ print(output[0]["generated_text"])
82
+ ```
83
+
84
+ ### Using the Model Locally
85
+
86
  You can use this model to generate lyrics in the style of different artists. Here's a simple example:
87
 
88
  ```python