Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,14 +39,10 @@ def generate_answer(user_input):
|
|
39 |
|
40 |
# Generate predictions on the test dataset
|
41 |
# Access the input column of the dataset using the column name
|
42 |
-
predictions = generator(
|
43 |
-
user_input,
|
44 |
-
max_new_tokens=100,
|
45 |
-
num_beams=1,
|
46 |
-
)
|
47 |
|
48 |
# Extract the generated text from the pipeline output
|
49 |
-
predictions = [pred[0]['generated_text'] for pred in predictions]
|
50 |
return predictions
|
51 |
|
52 |
# Create a Gradio interface
|
|
|
39 |
|
40 |
# Generate predictions on the test dataset
|
41 |
# Access the input column of the dataset using the column name
|
42 |
+
predictions = generator(user_input)[0]['generated_text']
|
|
|
|
|
|
|
|
|
43 |
|
44 |
# Extract the generated text from the pipeline output
|
45 |
+
#predictions = [pred[0]['generated_text'] for pred in predictions]
|
46 |
return predictions
|
47 |
|
48 |
# Create a Gradio interface
|