Spaces:
Sleeping
Sleeping
Update text2generation.py
Browse files- text2generation.py +3 -1
text2generation.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
import os
|
| 2 |
import httpx
|
|
|
|
| 3 |
|
| 4 |
def generate_long_answer(question):
|
| 5 |
"""Generate detailed answers using OpenRouter's DeepSeek API"""
|
|
@@ -27,4 +28,5 @@ def generate_long_answer(question):
|
|
| 27 |
return response.json()['choices'][0]['message']['content']
|
| 28 |
|
| 29 |
except Exception as e:
|
| 30 |
-
return f"Error generating answer: {str(e)}"
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
import httpx
|
| 3 |
+
import app
|
| 4 |
|
| 5 |
def generate_long_answer(question):
|
| 6 |
"""Generate detailed answers using OpenRouter's DeepSeek API"""
|
|
|
|
| 28 |
return response.json()['choices'][0]['message']['content']
|
| 29 |
|
| 30 |
except Exception as e:
|
| 31 |
+
return f"Error generating answer: {str(e)}"
|
| 32 |
+
text=app.generate_long_answer(question)
|