You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working on a project to create an AI chatbot using the OpenAI ChatGPT API with a Gradio interface. After following a step-by-step tutorial, I have encountered a problem in generating the public shareable URL.
Here's what I did:
I wrote the code in a Python script (app.py) utilizing the gpt-3.5-turbo model and the Gradio interface for the web interface. I used my own API key in the process.
I ran the script using the command python "C:\Users\X\Desktop\app.py" in the terminal.
After running the Python script, I could see the program generating a local URL, which works fine. However, the public URL, which should be provided for sharing the chatbot with others, is not being generated.
According to the Gradio documentation, setting the share=True parameter in gr.Interface() should create both a local and a public URL. In my case, it seems that this feature is not working as expected.
Upon running my Python script, a local URL is generated as expected, however, the public URL is not being generated. The error message I receive is:
Could not create share link. Please check your internet connection or our status page: https://status.gradio.app.
Also please ensure that your antivirus or firewall is not blocking the binary file located at: C:\Users\X\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\frpc_windows_amd64_v0.2
Internet connection is working, Gradio is working, Firewall is disabled. But I can't find this file: frpc_windows_amd64_v0.2
Can anyone provide insights on why this might be happening and how I can resolve this? I need the public shareable URL for testing purposes outside of my local network.
Describe the bug
I'm currently working on a project to create an AI chatbot using the OpenAI ChatGPT API with a Gradio interface. After following a step-by-step tutorial, I have encountered a problem in generating the public shareable URL.
Here's what I did:
gpt-3.5-turbo
model and the Gradio interface for the web interface. I used my own API key in the process.python "C:\Users\X\Desktop\app.py"
in the terminal.After running the Python script, I could see the program generating a local URL, which works fine. However, the public URL, which should be provided for sharing the chatbot with others, is not being generated.
According to the Gradio documentation, setting the
share=True
parameter ingr.Interface()
should create both a local and a public URL. In my case, it seems that this feature is not working as expected.Upon running my Python script, a local URL is generated as expected, however, the public URL is not being generated. The error message I receive is:
Internet connection is working, Gradio is working, Firewall is disabled. But I can't find this file: frpc_windows_amd64_v0.2
Can anyone provide insights on why this might be happening and how I can resolve this? I need the public shareable URL for testing purposes outside of my local network.
Environment:
Python version: 3.11.4
Gradio version: 3.35.2
OS: Windows 10, Build 22621
Your help is greatly appreciated. Thank you.
Have you searched existing issues? 🔎
Reproduction
import openai
import gradio as gr
openai.api_key = "Your API key"
messages = [
{"role": "system", "content": "You are a helpful and kind AI Assistant."},
]
def chatbot(input):
if input:
messages.append({"role": "user", "content": input})
chat = openai.ChatCompletion.create(
model="gpt-3.5-turbo", messages=messages
)
reply = chat.choices[0].message.content
messages.append({"role": "assistant", "content": reply})
return reply
inputs = gr.inputs.Textbox(lines=7, label="Chat with AI")
outputs = gr.outputs.Textbox(label="Reply")
gr.Interface(fn=chatbot, inputs=inputs, outputs=outputs, title="AI Chatbot",
description="Ask anything you want",
theme="compact").launch(share=True)
Screenshot
No response
Logs
No response
System Info
Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered: