Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,9 @@ pipeline = pipeline(model="jeevana/GenerativeQnASystem")
|
|
| 8 |
def predict(input):
|
| 9 |
print("pipeline object", pipeline)
|
| 10 |
prediction = pipeline(input)
|
| 11 |
-
|
|
|
|
|
|
|
| 12 |
return prediction
|
| 13 |
|
| 14 |
|
|
|
|
| 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('\n@Answer:'):]
|
| 14 |
return prediction
|
| 15 |
|
| 16 |
|