Update app.py
Browse files
app.py
CHANGED
|
@@ -37,7 +37,7 @@ def generate_post(article_link):
|
|
| 37 |
|
| 38 |
Посилання на джерело:
|
| 39 |
▪️джерело + link'''
|
| 40 |
-
genai.configure(api_key='
|
| 41 |
# Generate content using the Gemini Pro model
|
| 42 |
model = genai.GenerativeModel('gemini-pro')
|
| 43 |
response = model.generate_content(post_content)
|
|
@@ -50,8 +50,7 @@ iface = gr.Interface(
|
|
| 50 |
fn=generate_post,
|
| 51 |
inputs="text", # Input is a text box for the article link
|
| 52 |
outputs="text", # Output is a text box for the generated post
|
| 53 |
-
|
| 54 |
-
capture_session=True # Ensures that the code runs only once per user session
|
| 55 |
)
|
| 56 |
|
| 57 |
# Launch the Gradio interface
|
|
|
|
| 37 |
|
| 38 |
Посилання на джерело:
|
| 39 |
▪️джерело + link'''
|
| 40 |
+
genai.configure(api_key='AIzaSyAXQgvv-8j0kWn31WKRZBrTWairXgUoplQ')
|
| 41 |
# Generate content using the Gemini Pro model
|
| 42 |
model = genai.GenerativeModel('gemini-pro')
|
| 43 |
response = model.generate_content(post_content)
|
|
|
|
| 50 |
fn=generate_post,
|
| 51 |
inputs="text", # Input is a text box for the article link
|
| 52 |
outputs="text", # Output is a text box for the generated post
|
| 53 |
+
|
|
|
|
| 54 |
)
|
| 55 |
|
| 56 |
# Launch the Gradio interface
|