Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,10 +7,10 @@ pipeline = pipeline(model="jeevana/EmailSubjectLineGeneration", max_new_tokens=1
|
|
| 7 |
|
| 8 |
def predict(input):
|
| 9 |
print("pipeline object", pipeline)
|
| 10 |
-
prediction = pipeline(input)
|
| 11 |
prediction = prediction[0].get("generated_text")
|
| 12 |
print("1:::", prediction)
|
| 13 |
-
prediction = prediction[len(input)+len('@subject'):]
|
| 14 |
return prediction
|
| 15 |
|
| 16 |
|
|
|
|
| 7 |
|
| 8 |
def predict(input):
|
| 9 |
print("pipeline object", pipeline)
|
| 10 |
+
prediction = pipeline(input+'\n@subject\n')
|
| 11 |
prediction = prediction[0].get("generated_text")
|
| 12 |
print("1:::", prediction)
|
| 13 |
+
prediction = prediction[len(input)+len('\n@subject\n'):]
|
| 14 |
return prediction
|
| 15 |
|
| 16 |
|