learntocloud / define-the-cloud

API that serves LTC cloud dictionary
https://definethecloud.guide
MIT License
28 stars 8 forks source link

data analysis of defintion #189

Open madebygps opened 10 months ago

madebygps commented 10 months ago
madebygps commented 10 months ago

@rishp66

rishp66 commented 10 months ago

Additional Stuff:

rishp66 commented 9 months ago

completed making a sentiment analysis of each definition within the database using NTLK library

rishp66 commented 9 months ago

will now group by tag and then will perform contribution by authors and aggregate for # of contributions made by author and their individual sentiment analysis before moving onto time section

rishp66 commented 9 months ago

issue with graphing on streamlit

# Set a dark background style for Seaborn
sns.set(style='darkgrid')

plt.figure(figsize=(10, 6))
sns.barplot(x='sentiment_score', y='tag', data=sentiment_by_tag, palette='viridis')
plt.title('Sentiment Scores by Tag')
plt.show()

# setting warning message to false 
st.set_option('deprecation.showPyplotGlobalUse', False)

# plotting graph
st.pyplot()

With the following code, I need to create a horizontal bar chart comparing the sentiment of each tag. In this case, I have done it with Seaborn so I'll continue doing that but I cannot find anything for a horizontal bar chart that would work. I tried looking it up here -- let me know if you find anything

rishp66 commented 9 months ago

completed analysis of tags for sentiment analysis -- will perform the same for individual contributors and authors before moving onto the time section for both

madebygps commented 9 months ago

amazing work tracking the progress Rish!!! @rishp66

rishp66 commented 9 months ago

@madebygps thanks! just added some new graphs and stuff -- going to work on authors next :)

rishp66 commented 9 months ago

finished the first introductory page for authors, had to take a break cuz of exams going on for uni -- gonna finish sentiment analysis soon for the authors & then move onto final portion of time

rishp66 commented 6 months ago

Completed the Authors page after some time haha

rishp66 commented 6 months ago

FInished reimporting libraries & now working on Time page - will be done hopefully soon 🤞

rishp66 commented 5 months ago

Got some time to work on the project and all pages are now done but there is an issue.

The project can only be run on localhost.

I have had significant issues trying to deploy this utilizing many help pages and online resources from the Streamlit docs, trying out Azure documentation and refactoring the code. It will not take the credentials necessary to deploy it on the Streamlit cloud. Here is the link to the GitHub repo: https://github.com/rishp66/dictionary_analysis

Screenshot 2024-06-16 at 11 12 18 AM

rishp66 commented 5 months ago

Above, there is the error code statement.

madebygps commented 5 months ago

@rishabkumar7 you're a bit more familiar with streamlit+python. Have you seen this error? If not @rishp66 we can do a debugging session on l2c discord to work through this.

rishabkumar7 commented 5 months ago

@rishp66 are you trying to deploy it to Azure or Streamlit cloud, or you tried both and got the error. Also, the second screenshot, where is that from?

rishp66 commented 5 months ago

@rishabkumar7 I've only tried to deploy to streamlit cloud so far. There's only 1 screenshot, it's the same error page that I took the screenshot of.

@madebygps Yeah, we can do debugging session. Tbh, it's just that the st.secrets() is not taking the secrets I input that work fine within the TOML file on local

rishabkumar7 commented 5 months ago

@rishp66 and you are adding it in the advanced settings on Streamlit cloud interface? image

I think it would we easier to debug on a discord call.

rishp66 commented 5 months ago

Yep exactly, my Python version is a 3.12 so I'm unsure if that's causing the issue.

rishp66 commented 5 months ago

@rishabkumar7 i'll send you a message on discord

rishp66 commented 5 months ago

Deployed first container on Docker Hub and encountered this error when trying to deploy to acr:

  "code": "ContainerAppOperationError",
  "message": "Failed to provision revision for container app 'datadefinedcloud'. Error details: The following field(s) are either invalid or missing. Field 'template.containers.datadefinedcloud.image' is invalid with details: 'Invalid value: \"docker.io/rp999/dictionaryanalysis:latest\": image OS/Arc must be linux/amd64 but found linux/arm64';.."
rishp66 commented 5 months ago

Reconfiguring and deploying container with datadefinedcloud to Docker Hub with this command: docker buildx build --platform linux/amd64 -t datadefinedcloud .

rishabkumar7 commented 5 months ago

So. you need to make sure, your docker image is built for linux/amd64

rishp66 commented 5 months ago

See new Docker image here: https://hub.docker.com/repository/docker/rp999/datadefinedcloud/general

rishabkumar7 commented 5 months ago

The link doesn't work.

rishp66 commented 5 months ago

fixed it :)

rishabkumar7 commented 5 months ago

Yep, try deploying now, it should work.

rishp66 commented 5 months ago

That took about 3-4 hours so probably will work on deploying it to ACR later

rishp66 commented 5 months ago

Completed deployment to ACR:

madebygps commented 5 months ago

i removed your link, it has sub id in it, be careful with that moving forward

rishp66 commented 5 months ago

oh i see, my bad on that one :(

rishabkumar7 commented 5 months ago

@rishp66 let me know once we have the ACA deployed. Also, if you run into issue, feel free to reach out.

rishp66 commented 5 months ago

@rishabkumar7 The container app is up and running and can be accessed via a URL however it encounters an error after you put in the URL

rishp66 commented 5 months ago

ServiceRequestError: No connection adapters were found for [application url]

madebygps commented 5 months ago

what troubleshooting steps have you tried?

rishabkumar7 commented 5 months ago

@rishp66 My thoughts: So by default ACA ingress listens on port 443. For your container are you using the default streamlit port 8501? If yes, add that as the target port in ACA settings. You can find that in the Ingress tab.

Screenshot 2024-06-27 at 9 35 53 AM
rishp66 commented 4 months ago

what troubleshooting steps have you tried?

I was on vacation since the 28th but I believe I tried looking at some websites: https://www.slingacademy.com/article/fixing-python-requests-error-no-connection-adapters/ https://stackoverflow.com/questions/58866979/python-no-connection-adapters-were-found

Neither of these and the ones I found were I think relevant to the issue here.

rishp66 commented 4 months ago

@rishabkumar7 Ahhh I see, okay, I will change that when I can and follow up with an update on how it's going.

rishp66 commented 4 months ago

@rishabkumar7 I checked it out, and I reconfigured the target ports has been changed to 8501 but the same error appears of ServiceRequestError: No connection adapters were found for [application url]

rishp66 commented 4 months ago

Within looking at the error codes, it has something to do within the Azure Core library within the pipeline file. I did not find any relevant articles explaining how to perform anything regarding this error so I used Claude. It had said that it had something with the SDK being out of date so I performed the following command:

pip3 install --upgrade azure-cosmos

rishp66 commented 4 months ago

This stated that all requirements were already satisfied. However, I am unsure as what to do further since the only other options it gives are importing the requests library which I do not believe is necessary or changing network/firewall settings on the CosmosDB resource.