Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ generator = pipeline("text-generation", model="microsoft/Phi-3-mini-4k-instruct"
|
|
7 |
# Define the function to generate text based on input prompt
|
8 |
def generate_text(prompt):
|
9 |
# Generate text based on the input prompt
|
10 |
-
generated_text = generator(prompt)[0]['generated_text']
|
11 |
return generated_text
|
12 |
|
13 |
# Create Gradio interface
|
|
|
7 |
# Define the function to generate text based on input prompt
|
8 |
def generate_text(prompt):
|
9 |
# Generate text based on the input prompt
|
10 |
+
generated_text = generator(prompt, max_length=100, num_return_sequences=1)[0]['generated_text']
|
11 |
return generated_text
|
12 |
|
13 |
# Create Gradio interface
|