Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -663,7 +663,6 @@ def view():
|
|
663 |
kontent = file.read()
|
664 |
return title,kontent
|
665 |
|
666 |
-
|
667 |
with gr.Blocks(theme = "soft", title="Wordpress Article Generator") as article_generator:
|
668 |
gr.HTML(
|
669 |
"""<img src="https://botika.online/assets/uploads/2019/04/logo-primary-1.png" alt="Logo" style="width:126px;height:38px;"> """
|
@@ -674,21 +673,22 @@ with gr.Blocks(theme = "soft", title="Wordpress Article Generator") as article_g
|
|
674 |
Generator Artikel WordPress dengan Integrasi AI: Scraping, Publikasi, dan Optimalisasi Konten
|
675 |
""")
|
676 |
with gr.Row():
|
677 |
-
with gr.
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
|
|
|
|
|
|
689 |
view_outputs = gr.Button("View Article")
|
690 |
-
img = gr.Image(label="Content Media")
|
691 |
-
button_scrap.click(fn=scrap, inputs=[source_type,source,backlink,keyword,versi,api_key,link_azure,replicate_token], outputs= [output,img])
|
692 |
with gr.Tab("Raw Article"):
|
693 |
title = gr.Textbox("", label="Title", interactive=True)
|
694 |
content = gr.Textbox("", label="Content", interactive=True)
|
@@ -702,17 +702,18 @@ with gr.Blocks(theme = "soft", title="Wordpress Article Generator") as article_g
|
|
702 |
content = gr.HTML("")
|
703 |
view_outputs.click(fn=view_output, outputs=[title,content])
|
704 |
view_change.click(fn=view, outputs=[title,content])
|
705 |
-
with gr.
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
|
|
716 |
|
717 |
if __name__ == "__main__":
|
718 |
article_generator.launch()
|
|
|
663 |
kontent = file.read()
|
664 |
return title,kontent
|
665 |
|
|
|
666 |
with gr.Blocks(theme = "soft", title="Wordpress Article Generator") as article_generator:
|
667 |
gr.HTML(
|
668 |
"""<img src="https://botika.online/assets/uploads/2019/04/logo-primary-1.png" alt="Logo" style="width:126px;height:38px;"> """
|
|
|
673 |
Generator Artikel WordPress dengan Integrasi AI: Scraping, Publikasi, dan Optimalisasi Konten
|
674 |
""")
|
675 |
with gr.Row():
|
676 |
+
with gr.Tab("Scrap"):
|
677 |
+
with gr.Column():
|
678 |
+
source_type = gr.Radio(["link", "keyword"], label="Source", info="Pilih Jenis Source")
|
679 |
+
source = gr.Textbox(placeholder="Masukkan Source Berupa Link/Keyword Artikel Yang Akan Discrap", show_label=False)
|
680 |
+
backlink = gr.Textbox(placeholder="Masukkan Backlink Yang Akan Diterapkan", label="Backlink")
|
681 |
+
keyword = gr.Textbox(placeholder="Masukkan Fokus Keyphrase Yang Akan Diterapkan", label="Focus Keyphrase")
|
682 |
+
versi = gr.Radio(["openai", "azure"], label="Request Schema", info="Pilih Skema Untuk Request ke ChatGPT ")
|
683 |
+
api_key = gr.Textbox(placeholder="Masukkan Api Key", type="password",label="API Key")
|
684 |
+
link_azure = gr.Textbox(placeholder="Khusus Untuk Skema Request Menggunakan Azure",type="password", label="Azure Endpoint (Opsional)")
|
685 |
+
replicate_token = gr.Textbox(placeholder="Masukkan Token Replicate", type="password",label="Replicate Key")
|
686 |
+
button_scrap = gr.Button("Scrap Article")
|
687 |
+
output = gr.HTML("")
|
688 |
+
img = gr.Image(label="Content Media")
|
689 |
+
button_scrap.click(fn=scrap, inputs=[source_type,source,backlink,keyword,versi,api_key,link_azure,replicate_token], outputs= [output,img])
|
690 |
+
with gr.Tab("Optimize"):
|
691 |
view_outputs = gr.Button("View Article")
|
|
|
|
|
692 |
with gr.Tab("Raw Article"):
|
693 |
title = gr.Textbox("", label="Title", interactive=True)
|
694 |
content = gr.Textbox("", label="Content", interactive=True)
|
|
|
702 |
content = gr.HTML("")
|
703 |
view_outputs.click(fn=view_output, outputs=[title,content])
|
704 |
view_change.click(fn=view, outputs=[title,content])
|
705 |
+
with gr.Tab("Post"):
|
706 |
+
with gr.Column():
|
707 |
+
endpoint= gr.Textbox(placeholder="Masukkan Endpoint Wordpress", label="Endpoint Wordpress")
|
708 |
+
endpoint_media= gr.Textbox(placeholder="Masukkan Endpoint Media Wordpress", label="Endpoint Media")
|
709 |
+
username= gr.Textbox(placeholder="Masukkan Username Wordpress",label="Username")
|
710 |
+
password= gr.Textbox(placeholder="Masukkan Password Wordpress",type="password" ,label="Password")
|
711 |
+
tags= gr.Textbox(placeholder="Masukkan ID Tags Yang Akan Diterapkan", label="Tags")
|
712 |
+
categories= gr.Textbox(placeholder="Masukkan ID Kategori Artikel", label="Categori")
|
713 |
+
metode= gr.Radio(["publish", "draft"], label="Post Status", info="Pilih Metode Publish atau Draft Untuk Memposting")
|
714 |
+
button_post = gr.Button("Post Article")
|
715 |
+
status = gr.Textbox("", label="Response")
|
716 |
+
button_post.click(fn=post, inputs=[endpoint,endpoint_media,username,password,tags,categories,metode], outputs=status)
|
717 |
|
718 |
if __name__ == "__main__":
|
719 |
article_generator.launch()
|