Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter arandomgoodguy

    (@arandomgoodguy)

    Sure, you help me a lot! Thanks again!

    Thread Starter arandomgoodguy

    (@arandomgoodguy)

    Alright.

    Since that feature does not need frequent requests, it depends on how many users use it each day. Is it ok?

    Thread Starter arandomgoodguy

    (@arandomgoodguy)

    flash or flask service? What do you mean by saving a lot of work?

    Given that it may be difficult to build some custom features using only WordPress and the Code Manager, is using both Python (take care of my features) and PHP (take care of other parts) the most straightforward way to solve this issue?

    To elaborate, first I make my python script as a web service page using something like Flask. Then, I also create a WordPress website. Finally, I let my WordPress website call my API to perform custom features when users make a request. Is this idea viable?

    Thread Starter arandomgoodguy

    (@arandomgoodguy)

    I haven’t used flask yet. Although I can make them on the same server, that is my last resort. Can I just use WordPress and the Code Manager to do what flask can do?

    It seems that rewriting is the way to do it. But the problem is that my python script includes some functions from other python packages, so I don’t think rewriting it into PHP will be very easy. Are there any other solutions?

    I truly appreciate all your help on this matter!

    Thread Starter arandomgoodguy

    (@arandomgoodguy)

    Sorry, perhaps I wasn’t clear enough.

    To elaborate, I want a WordPress website that can do the things below.

    —————————————————————————————

    1.stock screener features
    (my first question and it is solved)

    2.input tickers and then output weight on the web page features
    (my second question and it is acheivable by using the Code Manager premium)

    3.my third question (Since it is a little complicated, the whole process is described as follows.)

    First of all, I put a trained model on my website. Then, users can use it by inputting something and clicking a button. After clicking, the trained model is told to predict the input which is given by users. Finally, its prediction is returned on the web page so users can get the results.

    —————————————————————————————

    From your second response, you said the second feature that I want (the code in my python script) can be achieved by using the Code Manager as a web service. Therefore, I wonder how to actually do that. Does that mean I must translate my python script into PHP or I can just write simple PHP code only to execute my python script?

    Besides, deploying a machine learning model can also be done by building a web service.
    A normal way to do that is using something like Flask, but that does not what I want since I also want to use some handy WordPress plugins like WP Data Access.

    What I wish is to use only WordPress and Code Manager to deploy a machine learning model like the features of Flask, but I am not sure whether it is possible. Also, if it is possible, is rewriting the code which is written in python originally into PHP the way to do that?

    Thread Starter arandomgoodguy

    (@arandomgoodguy)

    Yes! Your understanding is completely correct!

    From my understanding, Code Manager can perform highly flexible and specific features which existing WordPress plugins may lack for.

    As a result, I think what I need to do is rewriting my Python script like an API and translating it into a PHP code snippet. Is it correct? Or I can just simply use PHP to execute my Python script?

    Following this notion, it leads to another question I am really interested. I will be extraordinarily grateful if you can also answer my worry below.

    Normally, one can build a web page using package like Flask / FastAPI to deploy a machine learning model, and the web page mainly serves for single purpose.

    However, if one needs more than that, one may feel difficult integrating it with WordPress so one is not able to enjoy a lot of handy WordPress plugins.

    To sum up, I wonder if it is also possible to directly deploy model in WordPress by using Code Manager, without the need of maintaining a web page and a WordPress website.

    Thread Starter arandomgoodguy

    (@arandomgoodguy)

    Thanks for your kindly response. It really helps me out.

    In order to make sure that my idea is viable, I do need to ask another question although it is not quite related to your plugin.

    The question is about the next step of stock screening features asked above.

    To begin with, I have a python script that takes stock tickers as input and outputs portfolio allocation weights. The question is how to add this kind of function on WordPress so users can input their selected stock tickers and get the weight results.

    By searching on Google, I know one can execute a custom python script in WordPress as a plugin. However, I am not sure whether the input and output of the python script can also be displayed on the web page.

    For instance, there is an input block that lets users key in tickers. After the execution of my script, a data frame indicates the ticker, and shares can also be printed out on the same web page as a table like your plugin.

    As a result, when different tickers are inputted by users, different weight results can be printed.

    Is this possible? Thanks again!

Viewing 7 replies - 1 through 7 (of 7 total)