mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-24 17:06:53 +01:00
18 lines
393 B
Python
18 lines
393 B
Python
|
import json
|
||
|
import requests
|
||
|
|
||
|
HOST = 'localhost:5000'
|
||
|
URI = f'http://{HOST}/api/v1/finetune'
|
||
|
|
||
|
def finetune(lora_name, raw_text_file):
|
||
|
request = {
|
||
|
'lora_name': lora_name,
|
||
|
'raw_text_file': raw_text_file,
|
||
|
}
|
||
|
|
||
|
response = requests.post(URI, json=request)
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
lora_name = 'lora'
|
||
|
raw_text_file = 'input'
|
||
|
finetune(lora_name, raw_text_file)
|