-1

How to interact with oogabooga webui with my python terminal? I am running wizard models or the Pygmalion model. Have anyone tried this before if yes can u provide the code?

I have tried to do it with the api examples gives in his GitHub but I can't....(https://github.com/oobabooga/text-generation-webui/tree/main/api-examples)

desertnaut
  • 57,590
  • 26
  • 140
  • 166

1 Answers1

0

hello there are programs that cast local addresses to online hosted instances with localtunnel, look into those I believe you need to enter the port number into the interface in a 178 IP and it will return an IP code and a web address to enter it into then it will launch the required accessible interface.

Here is an example of another method that will deliver the information directly in the collab notebook instance:

import threading
import time
import socket
def iframe_thread(port):
  while True:
      time.sleep(0.5)
      sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      result = sock.connect_ex(('127.0.0.1', port))
      if result == 0:
        break
      sock.close()
  from google.colab import output
  output.serve_kernel_port_as_iframe(port, height=1024)
  print("to open it in a window you can open this link here:")
  output.serve_kernel_port_as_window(port)

threading.Thread(target=iframe_thread, daemon=True, args=(8188,)).start()

!python main.py --dont-print-server

regards! Riley