
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
ImportError: cannot import name 'Doc' from 'typing_extensions' (/usr/local/lib/python3.10/dist-packages/typing_extensions.py)
gradio를 import하는 과정에서 자꾸 해당 오류가 납니다.
gradio와 transformers 모두 인스톨 된 상태이고, 재설치하면 이미 설치된 항목이라고 뜹니다. (requirement already satisfied~)
AI에게 물으니 !pip install typing-extensions <를 실행시켜보라길래 설치해보았는데 이것도 이미 설치된 항목이라고 하더라고요ㅠㅠ


작성한 코드 및 에러 메세지
from transformers import pipeline
import gradio as gr
classifier = pipeline("sentiment-analysis")
def sentiment_analysis(text):
result = classifier(text)
return result
#gradio
interface = gr.Interface(
fn = sentiment_analysis,
inputs=gr.Textbox(),
outputs=gr.Textbox(),
examples=["I Love this", "I hate this"]
)
interface.launch(share=True)
해당 코드를 작성했는데 import gradio as gr < 줄에서 자꾸 오류가 납니다..
