pablocst commited on
Commit
3053875
1 Parent(s): c76d068

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -9
app.py CHANGED
@@ -103,18 +103,21 @@ Assistant: <utterance>
103
  ```
104
  In this app, you can explore the outputs of a gpt-3.5-turbo LLM.
105
  """
106
-
107
- with gr.Blocks(css = """#col_container {width: 1000px; margin-left: auto; margin-right: auto;}
108
- #chatbot {height: 520px; overflow: auto;}
109
- #texto textarea {height: 100px;""") as demo:
 
 
 
 
110
  gr.HTML(title)
111
  gr.HTML('''<center><a href="https://huggingface.co/spaces/ysharma/ChatGPTwithAPI?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>Duplicate the Space and run securely with your OpenAI API Key</center>''')
112
- with gr.Column(elem_id = "col_container"):
113
  openai_api_key = gr.Textbox(type='password', label="Enter your OpenAI API key here")
114
- chatbot = gr.Chatbot(elem_id = "chatbot") #c
115
- with gr.Column(elem_id = "texto"):
116
- inputs = gr.Textbox(placeholder = "Hi there!", label= "Type an input and press Enter") #t
117
- state = gr.State([]) #s
118
  b1 = gr.Button()
119
 
120
  #inputs, top_p, temperature, top_k, repetition_penalty
 
103
  ```
104
  In this app, you can explore the outputs of a gpt-3.5-turbo LLM.
105
  """
106
+
107
+ css = """
108
+ #col_container {width: 1000px; margin-left: auto; margin-right: auto;}
109
+ #chatbot {height: 520px; overflow: auto;}
110
+ .large-textbox textarea {height: 100px;}
111
+ """
112
+
113
+ with gr.Blocks(css=css) as demo:
114
  gr.HTML(title)
115
  gr.HTML('''<center><a href="https://huggingface.co/spaces/ysharma/ChatGPTwithAPI?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a>Duplicate the Space and run securely with your OpenAI API Key</center>''')
116
+ with gr.Column(elem_id="col_container"):
117
  openai_api_key = gr.Textbox(type='password', label="Enter your OpenAI API key here")
118
+ chatbot = gr.Chatbot(elem_id="chatbot")
119
+ inputs = gr.Textbox(placeholder="Hi there!", label="Type an input and press Enter", elem_classes="large-textbox")
120
+ state = gr.State([])
 
121
  b1 = gr.Button()
122
 
123
  #inputs, top_p, temperature, top_k, repetition_penalty