rairo commited on
Commit
4437adf
1 Parent(s): 0efaead

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +15 -0
main.py CHANGED
@@ -30,6 +30,21 @@ load_dotenv()
30
  app = Flask(__name__)
31
  cors = CORS(app)
32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  @app.route("/", methods=["GET"])
34
  def home():
35
 
 
30
  app = Flask(__name__)
31
  cors = CORS(app)
32
 
33
+ class StreamLitResponse(ResponseParser):
34
+ def __init__(self,context) -> None:
35
+ super().__init__(context)
36
+ def format_dataframe(self,result):
37
+ st.dataframe(result['value'])
38
+ return
39
+ def format_plot(self,result):
40
+ st.image(result['value'])
41
+ return
42
+ def format_other(self, result):
43
+ st.write(result['value'])
44
+ return
45
+
46
+ gemini_api_key = os.environ['Gemini']
47
+
48
  @app.route("/", methods=["GET"])
49
  def home():
50