Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,9 @@
|
|
|
|
|
|
|
|
|
|
1 |
import base64
|
|
|
2 |
|
3 |
def process_file(api_key, file, instructions):
|
4 |
# Set up Gemini API
|
@@ -36,7 +41,7 @@ def process_file(api_key, file, instructions):
|
|
36 |
|
37 |
return visualizations
|
38 |
|
39 |
-
#
|
40 |
with gr.Blocks() as demo:
|
41 |
gr.Markdown("Data Visualization with Gemini")
|
42 |
api_key = gr.Textbox(label="Enter Gemini API Key")
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import pandas as pd
|
3 |
+
import matplotlib.pyplot as plt
|
4 |
+
import io
|
5 |
import base64
|
6 |
+
import google.generativeai as genai
|
7 |
|
8 |
def process_file(api_key, file, instructions):
|
9 |
# Set up Gemini API
|
|
|
41 |
|
42 |
return visualizations
|
43 |
|
44 |
+
# Gradio interface
|
45 |
with gr.Blocks() as demo:
|
46 |
gr.Markdown("Data Visualization with Gemini")
|
47 |
api_key = gr.Textbox(label="Enter Gemini API Key")
|