gnumanth commited on
Commit
d9acbec
·
verified ·
1 Parent(s): a079223

chore:api key

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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=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. "