-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
bithalo
committed
Nov 16, 2024
1 parent
f3a5f3b
commit b9d355b
Showing
6 changed files
with
133 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
Must have ssh for your system which is natively supported in most operating systems | ||
and its easy to set up. | ||
|
||
_________________________________________________________________________________________ | ||
_____________________________________________________________________________________________ | ||
Set up NGROK | ||
_________________________________________________________________________________________ | ||
_____________________________________________________________________________________________ | ||
|
||
To generate your key: | ||
ssh-keygen -t rsa | ||
|
||
Then sign up for ngrok, register your key and make ngrok.yml and follow their instructions | ||
Then sign up for ngrok, and follow instructions to make ngrok.yml and place it in the same | ||
directory as your files. Then create a custom domain on ngrok. The line below listed | ||
here starts the server however you will run it at a later step through the bat file. | ||
ngrok http --url=your-custom-url.ngrok-free.app 9000 | ||
|
||
_________________________________________________________________________________________ | ||
_____________________________________________________________________________________________ | ||
Or set up localhost.run | ||
_________________________________________________________________________________________ | ||
_____________________________________________________________________________________________ | ||
|
||
Alternatively you can use localhost.run | ||
Localhost.run server setup: | ||
|
@@ -30,11 +32,11 @@ Or to skip key for above steps type: | |
ssh -o ServerAliveInterval=60 -R 80:localhost:9000 [email protected] | ||
Then you can take requests by the link it provides | ||
|
||
_________________________________________________________________________________________ | ||
_____________________________________________________________________________________________ | ||
Then set up config file, index and bat file | ||
__________________________________________________________________________________________ | ||
_____________________________________________________________________________________________ | ||
|
||
To set up your servers details and API keys, edit the config.js file in static directory | ||
To set up your servers details and API keys, edit the config.js file in static directory. | ||
If needed ctrl + f5 hard refresh gecko and restart server for changes to take effect. | ||
Your password should be the same one you use to log into BitBay web markets as a node. | ||
Also you public key should be registered so users know how to connect to you. | ||
|
@@ -48,7 +50,8 @@ For security do not put sensitive files in the "static" directory | |
|
||
Next, so people can connect and test with the generic account you can replace the line | ||
var serverPublicKey = "" | ||
in the index.html file so you and any users can test the server remotely by visiting the | ||
in the index.html file with the same public key shown when you log into BitBay with | ||
the same password. Doing this allows users to test the server remotely by visiting the | ||
ngrok page link. Also replace the line in index.html that says | ||
var apiUrl = "https://your-custom-url.ngrok-free.app/api"; | ||
with the URL of your ngrok server | ||
|
@@ -65,10 +68,42 @@ python server.py | |
Otherwise you may use the prebuilt server executable. For security you may choose to download | ||
your own copies of ngrok.exe and of geckodriver.exe as well | ||
|
||
_________________________________________________________________________________________ | ||
_____________________________________________________________________________________________ | ||
Run the server | ||
__________________________________________________________________________________________ | ||
_____________________________________________________________________________________________ | ||
|
||
Finally load "pythonserver.bat" which will automatically boot up your ngrok server and | ||
your python server. You are of course able to edit the python code and index to run different | ||
apis or use different locally run AI models. | ||
|
||
_____________________________________________________________________________________________ | ||
Join the community of nodes | ||
_____________________________________________________________________________________________ | ||
|
||
You may finally share your nodes Polygon or Ethereum address (seen during BitBay web markets | ||
login) as well as your public key and custom ngrok server URL with the BitBay community to be | ||
potentially added to the pool of affiliates. However to be an affiliate you must also be an | ||
active user of the markets. Affiliates do not have to be nodes and may also be marketers. | ||
However when a user doesn't select an affiliate one may be selected randomly among the nodes. | ||
|
||
_____________________________________________________________________________________________ | ||
Run BitBay web markets simultaneously | ||
_____________________________________________________________________________________________ | ||
|
||
To allow moderation results to be accessible when your node is offline and to reduce load on | ||
your server, log into BitBay web markets using your password and it should say you are a node. | ||
Then, it will automatically start to build an IPFS database which is shared with users. | ||
There will be gas costs to post this data to the blockchain however it is affordable and you | ||
can choose how many times a day you will scan orders and post the data. Eventually this | ||
data could even be used to improve searches. However, your node must be online for new orders | ||
since they pin to IPFS using your Pinata API or your custom IPFS node. | ||
|
||
_____________________________________________________________________________________________ | ||
Custom AI models | ||
_____________________________________________________________________________________________ | ||
|
||
By modifying some of the Python code, a custom AI model could be used for moderation assuming | ||
you are skilled at making a robust set of prompts that have been battle tested for accuracy. | ||
This can be used for image moderation and text moderation(for example using Molmo). Lastly, | ||
you can set up your own IPFS node to reduce the reliance on services like Pinata. This will | ||
allow you to run the entire system at home without having to pay for API keys. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters