Spaces:
No application file
No application file
Create main.py
Browse files
main.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import pipeline
|
| 2 |
+
|
| 3 |
+
# Initialize the text generation pipeline with the specified model
|
| 4 |
+
generator = pipeline('text-generation', model='KoboldAI/OPT-13B-Erebus')
|
| 5 |
+
|
| 6 |
+
# Generate text
|
| 7 |
+
generated_text = generator("Welcome Captain Janeway, I apologize for the delay.", do_sample=True, min_length=50)
|
| 8 |
+
|
| 9 |
+
# Print the generated text
|
| 10 |
+
print(generated_text)
|