Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| from langchain_groq import ChatGroq | |
| from langchain.prompts import PromptTemplate | |
| st.title('AI Scientist') | |
| st.subheader('Here you will find solution for your problem') | |
| model=ChatGroq(temperature=0.6, | |
| groq_api_key='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', | |
| model_name="llama-3.1-70b-versatile") | |
| A=st.text_input('ENTER YOUR PROBLEM') | |
| SUB=st.button('SUBMIT') | |
| B=PromptTemplate(input=['C'], | |
| template="""you are a highest ranked scientist working in Harvard University for more than 30 years, | |
| you know every concepts and reactions in science,now tell me about {C} in 20 words and suggest an alternate for it in 20 words.""") | |
| if SUB: | |
| D=B.format(C=A) | |
| response=model.invoke(D) | |
| st.write(response.content) |