minko186 commited on
Commit
7ee086c
·
verified ·
1 Parent(s): 2230562

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +59 -58
app.py CHANGED
@@ -228,66 +228,67 @@ def generate(
228
 
229
  def create_app():
230
  with gr.Blocks() as app:
231
- with gr.Column():
232
- topic_input = gr.Textbox(
233
- label="Topic",
234
- placeholder="Enter the main topic of your article",
235
- elem_classes="input-highlight-pink",
236
- )
237
- length_input = gr.Slider(
238
- minimum=50,
239
- maximum=5000,
240
- step=50,
241
- value=300,
242
- label="Article Length",
243
- elem_classes="input-highlight-pink",
244
- )
245
- tone_input = gr.Dropdown(
246
- choices=[
247
- "Formal",
248
- "Informal",
249
- "Technical",
250
- "Conversational",
251
- "Journalistic",
252
- "Academic",
253
- "Creative",
254
- ],
255
- value="Formal",
256
- label="Writing Style",
257
- elem_classes="input-highlight-yellow",
258
  )
259
- format_input = gr.Dropdown(
260
- choices=[
261
- "Article",
262
- "Essay",
263
- "Blog post",
264
- "Report",
265
- "Research paper",
266
- "News article",
267
- "White paper",
268
- "Email",
269
- "LinkedIn post",
270
- "X (Twitter) post",
271
- "Instagram Video Content",
272
- "TikTok Video Content",
273
- "Facebook post",
274
- ],
275
- value="Article",
276
- label="Format",
277
- elem_classes="input-highlight-turquoise",
278
  )
279
-
280
- pdf_input = gr.File(label="Upload PDFs", file_types=["pdf"], file_count="multiple")
281
- generate_button = gr.Button("Generate")
282
- with gr.Column():
283
- generated_text_output = gr.Textbox(label="Generated Text", lines=10)
284
- citations_output = gr.Textbox(label="Citations", lines=10)
285
-
286
- generate_button.click(
287
- fn=process_input,
288
- inputs=[topic_input, length_input, tone_input, format_input, pdf_input],
289
- outputs=[generated_text_output, citations_output]
290
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
 
292
  return app
293
 
 
228
 
229
  def create_app():
230
  with gr.Blocks() as app:
231
+ with gr.Row():
232
+ with gr.Column():
233
+ topic_input = gr.Textbox(
234
+ label="Topic",
235
+ placeholder="Enter the main topic of your article",
236
+ elem_classes="input-highlight-pink",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  )
238
+ length_input = gr.Slider(
239
+ minimum=50,
240
+ maximum=5000,
241
+ step=50,
242
+ value=300,
243
+ label="Article Length",
244
+ elem_classes="input-highlight-pink",
 
 
 
 
 
 
 
 
 
 
 
 
245
  )
246
+ tone_input = gr.Dropdown(
247
+ choices=[
248
+ "Formal",
249
+ "Informal",
250
+ "Technical",
251
+ "Conversational",
252
+ "Journalistic",
253
+ "Academic",
254
+ "Creative",
255
+ ],
256
+ value="Formal",
257
+ label="Writing Style",
258
+ elem_classes="input-highlight-yellow",
259
+ )
260
+ format_input = gr.Dropdown(
261
+ choices=[
262
+ "Article",
263
+ "Essay",
264
+ "Blog post",
265
+ "Report",
266
+ "Research paper",
267
+ "News article",
268
+ "White paper",
269
+ "Email",
270
+ "LinkedIn post",
271
+ "X (Twitter) post",
272
+ "Instagram Video Content",
273
+ "TikTok Video Content",
274
+ "Facebook post",
275
+ ],
276
+ value="Article",
277
+ label="Format",
278
+ elem_classes="input-highlight-turquoise",
279
+ )
280
+
281
+ pdf_input = gr.File(label="Upload PDFs", file_types=["pdf"], file_count="multiple")
282
+ generate_button = gr.Button("Generate")
283
+ with gr.Column():
284
+ generated_text_output = gr.Textbox(label="Generated Text", lines=10)
285
+ citations_output = gr.Textbox(label="Citations", lines=10)
286
+
287
+ generate_button.click(
288
+ fn=process_input,
289
+ inputs=[topic_input, length_input, tone_input, format_input, pdf_input],
290
+ outputs=[generated_text_output, citations_output]
291
+ )
292
 
293
  return app
294