Spaces:
Sleeping
Sleeping
chore:api key
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
|
|
2 |
import google.generativeai as genai
|
3 |
from markitdown import MarkItDown
|
4 |
from typing import Union
|
|
|
5 |
|
6 |
def extract_content(input_source: str) -> str:
|
7 |
"""Extract text content using MarkItDown"""
|
@@ -14,7 +15,7 @@ def extract_content(input_source: str) -> str:
|
|
14 |
|
15 |
def summarize_content(content: str, api_key: str) -> str:
|
16 |
"""Summarize text using Gemini Flash"""
|
17 |
-
genai.configure(api_key=
|
18 |
model = genai.GenerativeModel('gemini-1.5-flash')
|
19 |
response = model.generate_content(
|
20 |
f"Create a structured summary with key points using bullet points. "
|
|
|
2 |
import google.generativeai as genai
|
3 |
from markitdown import MarkItDown
|
4 |
from typing import Union
|
5 |
+
import os
|
6 |
|
7 |
def extract_content(input_source: str) -> str:
|
8 |
"""Extract text content using MarkItDown"""
|
|
|
15 |
|
16 |
def summarize_content(content: str, api_key: str) -> str:
|
17 |
"""Summarize text using Gemini Flash"""
|
18 |
+
genai.configure(api_key=os.getenv('GEMINI_KEY'))
|
19 |
model = genai.GenerativeModel('gemini-1.5-flash')
|
20 |
response = model.generate_content(
|
21 |
f"Create a structured summary with key points using bullet points. "
|