ysharma HF staff commited on
Commit
2967cfa
·
verified ·
1 Parent(s): 6d4b7c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -13
app.py CHANGED
@@ -247,22 +247,26 @@ def create_demo():
247
  type="messages",
248
  show_label=True
249
  )
 
250
 
251
- topic = gr.Textbox(
252
- label="Article Topic",
253
- placeholder="Enter the topic you want an article about...",
254
- lines=2
255
- )
256
-
257
- async def process_input(topic, history):
258
- history.append(ChatMessage(role="user", content=f"Write an article about: {topic}"))
259
- yield history
260
 
261
- async for messages in article_crew.process_article(topic):
262
- history.extend(messages)
263
  yield history
264
-
265
- btn = gr.Button("Write Article", variant="primary")
 
 
 
 
 
266
  btn.click(
267
  process_input,
268
  inputs=[topic, chatbot],
 
247
  type="messages",
248
  show_label=True
249
  )
250
+
251
 
252
+ with gr.Row(equal_height=True):
253
+ topic = gr.Textbox(
254
+ label="Article Topic",
255
+ placeholder="Enter the topic you want an article about...",
256
+ #lines=2,
257
+ scale=4
258
+ )
 
 
259
 
260
+ async def process_input(topic, history):
261
+ history.append(ChatMessage(role="user", content=f"Write an article about: {topic}"))
262
  yield history
263
+
264
+ async for messages in article_crew.process_article(topic):
265
+ history.extend(messages)
266
+ yield history
267
+
268
+ btn = gr.Button("Write Article", variant="primary", scale=1)
269
+
270
  btn.click(
271
  process_input,
272
  inputs=[topic, chatbot],