According to: Sharing Your App in order to share gradio app,
we need to set: demo.launch(share=True) and we get a share link (https://XXX.gradio.live), which opens ssh tunnel with a machine in us-west.
How can I share my gradio app in my local machine (instead in us-west machine) ?
In this way I can only access from my local machine.
I want to access from any machine in my local network (i.e: http://10.100.102.105:7860 instead of http://localhost:7860/ ).
import random
import gradio as gr
def alternatingly_agree(message, history):
if len(history) % 2 == 0:
return f"Yes, I do think that '{message}'"
else:
return "I don't think so"
gr.ChatInterface(alternatingly_agree).launch(server_name="0.0.0.0", server_port=7860)