Spaces:
Sleeping
Sleeping
File size: 1,063 Bytes
de43789 54b648a d93e314 de43789 2be5891 db4e906 a1a96ab 3b76496 a1a96ab db4e906 a1a96ab db4e906 a1a96ab c68709e 3b76496 a1a96ab db4e906 a1a96ab db4e906 a1a96ab db4e906 a1a96ab db4e906 a1a96ab db4e906 a1a96ab db4e906 a1a96ab db4e906 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
import streamlit as st
# from IPython.display import display
# from IPython.display import Markdown
import os
gemini_api_key = os.getenv("GEMINI_API_KEY")
# def to_markdown(text):
# text = text.replace('•', ' *')
# return Markdown(textwrap.indent(text, '> ', predicate=lambda _: True)
import google.generativeai as genai
genai.configure(api_key = gemini_api_key)
model = genai.GenerativeModel('gemini-pro')
response = model.generate_content("What is the meaning of life?")
st.text(response.text)
# Define a function that will be called when the user clicks the button
def greet_user():
# Get the user's name from the text input
name = st.text_input("Enter your name:")
# Greet the user
st.write(f"Hello, {name}!")
# Add a button to the app
st.button("Greet me!", greet_user)
st.title("Hello! Streamlit App")
x = st.slider('Select a value')
st.write(x, 'squared is', x * x)
# st.title('AI Fitness Trainer: Squats Analysis')
# recorded_file = 'output_sample.mp4'
# sample_vid = st.empty()
# sample_vid.video(recorded_file)
|