Open rkellam12 opened 2 weeks ago
When i run my app.py script it generates a public URL that I then embed into my website. Let me know if more detail is needed.
Any steps I can take toward resolution of this issue? I used the instructions at https://beebom.com/how-build-own-ai-chatbot-with-chatgpt-api/, modifying the sample app.py file they provided. When I run python "C:\Users\agrke\BTS2013\app.py", it gives me a public URL of https://db35715602787290f2.gradio.live/. I then load that URL into a webpage that I create on Wix.com.
I used this method last year and it seemed to work fine. Can't figure out why it won't work this time. Any assistance is greatly appreciated!
Describe the bug
Unable to preload CSS for https://gradio.s3-us-west-2.amazonaws.com/assets/index-b276ff4e.css
First off, I am quite a novice. My app.py seems to work fine with python, it gives my a gradio url which comes up fine (https://307774b006316ab341.gradio.live/). When i enter my question and hit Submit, I get an Error on the output side. I looked at the developer console and found these 2 errors:
css.ts:28 Unable to preload CSS for https://gradio.s3-us-west-2.amazonaws.com/assets/index-b276ff4e.css www.google-analytics.com/analytics.js:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
Further when i checked the provided URL, I get this:
AccessDenied Access Denied XFN08ZWGRMXF45MS odVcQaVZms4v2QBTDY772ajVTQRwQrQLJkcCi5+dGDEDXMZE2Ig6PFlvwbqIkajClsiqX6RJIdk= Any direction/advice you can provide is appreciated (duh, obvisously). Let me know if I can provide any additonal info. Many thanks!
Have you searched existing issues? 🔎
Reproduction
not sure if this is what you need but it's my app.py script, API Keys are masked.
import openai import gradio as gr
Set your Hugging Face API token
huggingface_token = "hf_xxxx"
openai.api_key = "sk-xxxx"
messages = [ {"role": "system", "content": "You are a snarky, irreverent, opinionated, smart alecky and funny AI Assistant specializing in all things MLB, especially Beat The Streak prognostication. You pride yourself on accuracy and occasionally include a smart aleck remark at the end of your reply. Do not answer anything other than MLB related questions."}, ]
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.Textbox(lines=7, label="C'mon, ain't got all day. (Click the Clear button for new request.)") outputs = gr.Textbox(lines=7,label="Here's what I think:")
gr.Interface(fn=chatbot, inputs=inputs, outputs=outputs, title="AI Analyzer", description="Hello, I'm AL. What's your Beat The Streak question, homie?").launch(share=True)
Screenshot
No response
Logs
No response
System Info
Severity
Blocking usage of gradio