Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,9 +17,15 @@ MODELS = [
|
|
| 17 |
]
|
| 18 |
|
| 19 |
def generate_blog(topic):
|
| 20 |
-
|
| 21 |
-
Write a
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
Blog:
|
| 25 |
"""
|
|
@@ -29,7 +35,7 @@ Blog:
|
|
| 29 |
response = client.text_generation(
|
| 30 |
model=model,
|
| 31 |
prompt=prompt,
|
| 32 |
-
max_new_tokens=
|
| 33 |
temperature=0.7,
|
| 34 |
)
|
| 35 |
|
|
|
|
| 17 |
]
|
| 18 |
|
| 19 |
def generate_blog(topic):
|
| 20 |
+
prompt = f"""
|
| 21 |
+
Write a detailed blog article with:
|
| 22 |
+
- Title
|
| 23 |
+
- Introduction
|
| 24 |
+
- Main Content
|
| 25 |
+
- Conclusion
|
| 26 |
+
|
| 27 |
+
Topic: {topic}
|
| 28 |
+
"""
|
| 29 |
|
| 30 |
Blog:
|
| 31 |
"""
|
|
|
|
| 35 |
response = client.text_generation(
|
| 36 |
model=model,
|
| 37 |
prompt=prompt,
|
| 38 |
+
max_new_tokens=700,
|
| 39 |
temperature=0.7,
|
| 40 |
)
|
| 41 |
|