forked from equinor/neqsimweb2
-
Notifications
You must be signed in to change notification settings - Fork 2
/
welcome.py
58 lines (45 loc) · 2.33 KB
/
welcome.py
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
49
50
51
52
53
54
55
56
57
58
import altair as alt
import numpy as np
import pandas as pd
import streamlit as st
import openai
from openai import OpenAI
def make_request(question_input: str):
try:
OpenAI.api_key = openai_api_key
client = OpenAI(api_key=openai_api_key)
except:
st.write('OpenAI key not provided...')
try:
completion = client.completions.create(
model="gpt-3.5-turbo-instruct",
prompt=question_input,
max_tokens=500,
temperature=0
)
return completion.choices[0].text
except:
return ""
st.set_page_config(page_title="NeqSim", page_icon='images/neqsimlogocircleflat.png')
st.image('images/neqsimlogocircleflat.png', width=150)
st.write("# Welcome to the NeqSim Simulation Platform! 👋")
"""
### About NeqSim
NeqSim (Non-equilibrium Simulator) is a library for the simulation of fluid behavior, phase equilibrium, and process systems.
Explore the various models and simulations NeqSim offer through this easy-to-use Streamlit interface.
### Documentation & Tutorials
For comprehensive documentation on how to use NeqSim for processing and fluid simulations, please refer to our detailed tutorial:
[Introduction to Gas Processing Using NeqSim](https://colab.research.google.com/github/EvenSol/NeqSim-Colab/blob/master/notebooks/examples_of_NeqSim_in_Colab.ipynb)
### GitHub Repository
NeqSim is developed in the Java programming language and is available as an open-source project via GitHub. You can access the complete source code and contribute to the project via the home page:
- [NeqSim Home](https://equinor.github.io/neqsimhome/)
### Community & Feedback
We welcome any feedback, questions, or suggestions for further development. Join the conversation or contribute to discussions on our GitHub page:
- [NeqSim GitHub Discussions](https://github.com/equinor/neqsim/discussions)
### Getting Started
Use the left-hand menu to select the desired simulation or process. Enter any required inputs, and NeqSim will handle the calculations.
### NeqSim AI Assistant
NeqSim is integrated with OpenAI for enhanced simulation support. Enter your OpenAI API key in the sidebar to interact with the AI assistant for insights and guidance related to your simulations.
"""
openai_api_key = st.sidebar.text_input("OpenAI API Key", type="password")
st.make_request = make_request