Spaces:
Sleeping
Sleeping
| import google.generativeai as genai | |
| import streamlit as st | |
| import os | |
| from groq import Groq | |
| client = Groq( | |
| api_key=os.getenv("Groq_key"), | |
| ) | |
| if uinput := st.text_input("Enter your query: "): | |
| chat_completion = client.chat.completions.create( | |
| messages=[ | |
| { | |
| "role": "user", | |
| "content":f"Give answer to the provided input in a very funny way. Input={uinput}" , | |
| } | |
| ], | |
| model="mixtral-8x7b-32768", | |
| ) | |
| st.write(chat_completion.choices[0].message.content) | |
| st.write("space...\n\n\n") | |
| st.write(chat_completion) | |
| print(chat_completion.choices[0].message.content) | |
| # import os | |
| # GOOGLE_API_KEY=os.getenv('Gemini_key') | |
| # genai.configure(api_key=GOOGLE_API_KEY) | |
| # model = genai.GenerativeModel('gemini-pro') | |
| # if uinput := st.text_input("Enter your query: "): | |
| # response = model.generate_content(uinput) | |
| # st.write(response.text) |