Spaces:
Sleeping
Sleeping
File size: 915 Bytes
d9c7250 796daff b48b535 796daff b48b535 796daff b48b535 796daff b48b535 c5564f1 b48b535 796daff b48b535 796daff b48b535 796daff d9c7250 b48b535 d9c7250 b48b535 d9c7250 b48b535 | 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 | 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) |