-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgpt_prototype.py
72 lines (54 loc) · 1.53 KB
/
gpt_prototype.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import streamlit as st
import requests
import json
st.set_page_config(
page_title='Flit Automatic Biz Plan'
)
# Set Max Width
def _max_width_():
max_width_str = f"max-width: 1400px;"
st.markdown(
f"""
<style>
.reportview-container .main .block-container{{
{max_width_str}
}}
</style>
""",
unsafe_allow_html=True,
)
_max_width_()
with st.sidebar:
st.markdown("""
# About
<Flit>'s Biz Plan Supporter is a helper tool built on GPT-3..
""")
st.markdown("""
# How does it work
작성하던 사업계획서의 부분을 입력하고 엔터를 누르면 텍스트가 생성됩니다
""")
st.markdown("""
Made by [@junseokangofficial] at SPARCS Hackathon
""",
unsafe_allow_html=True,
)
st.image('ico.png')
st.title('Flit Automatic Biz Plan')
st.header("")
st.markdown("### Team A - Flit's Biz Plan Generator")
st.markdown("") # 구분선
input_prompt = None
if 'output' not in st.session_state:
st.session_state['output'] = 1
if st.session_state['output'] != 0:
st.markdown("""
# Biz Plan Prompter
""")
input_prompt = st.text_input("Input your Biz Plan", disabled=False, placeholder="What's on your mind?")
st.session_state['output'] = st.session_state['output'] + 1
if input_prompt:
prompt = "Here is suggestion for you.."
result = requests.get(
url="http://ec2-43-201-42-19.ap-northeast-2.compute.amazonaws.com:9000/generate/{0}".format(input_prompt),
).json()['suggestion']
st.info(result)