Spaces:
Runtime error
Runtime error
Update text_analysis.py
Browse files- text_analysis.py +9 -8
text_analysis.py
CHANGED
|
@@ -1,11 +1,12 @@
|
|
| 1 |
# text_analysis.py dosyası
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
| 1 |
# text_analysis.py dosyası
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
+
# Pipeline ile metin üretim fonksiyonu
|
| 5 |
+
def generate_lesson_from_transcript(doc_text):
|
| 6 |
+
# Text generation pipeline'ını başlatıyoruz
|
| 7 |
+
pipe = pipeline("text-generation", model="jondurbin/airoboros-gpt-3.5-turbo-100k-7b")
|
| 8 |
+
|
| 9 |
+
# Ders anlatımı oluşturulacak metni üret
|
| 10 |
+
generated_text = pipe(doc_text, max_length=500)[0]['generated_text']
|
| 11 |
+
|
| 12 |
+
return generated_text
|