Morgan commited on
Commit ·
3d756ca
1
Parent(s): 73dfa35
fixed gradio handling
Browse files- Dockerfile +1 -1
- interface.py +1 -2
Dockerfile
CHANGED
|
@@ -20,4 +20,4 @@ COPY --chown=user . /app
|
|
| 20 |
RUN pip install --no-cache-dir .
|
| 21 |
|
| 22 |
# Command to run the app
|
| 23 |
-
CMD ["python", "
|
|
|
|
| 20 |
RUN pip install --no-cache-dir .
|
| 21 |
|
| 22 |
# Command to run the app
|
| 23 |
+
CMD ["python", "interface.py"]
|
interface.py
CHANGED
|
@@ -99,7 +99,7 @@ def improve_translations(system_prompt, temperature, top_p):
|
|
| 99 |
return sentence_pairs_df, scores_df, evaluation_message
|
| 100 |
|
| 101 |
# Gradio interface
|
| 102 |
-
|
| 103 |
fn=improve_translations,
|
| 104 |
inputs=[
|
| 105 |
gr.Textbox(label="System Prompt", placeholder="Define the assistant's behavior here..."),
|
|
@@ -115,4 +115,3 @@ demo = gr.Interface(
|
|
| 115 |
description="Improve translations using GPT-4 and evaluate the results with ChrF and COMET."
|
| 116 |
)
|
| 117 |
|
| 118 |
-
demo.launch(share=True)
|
|
|
|
| 99 |
return sentence_pairs_df, scores_df, evaluation_message
|
| 100 |
|
| 101 |
# Gradio interface
|
| 102 |
+
app = gr.Interface(
|
| 103 |
fn=improve_translations,
|
| 104 |
inputs=[
|
| 105 |
gr.Textbox(label="System Prompt", placeholder="Define the assistant's behavior here..."),
|
|
|
|
| 115 |
description="Improve translations using GPT-4 and evaluate the results with ChrF and COMET."
|
| 116 |
)
|
| 117 |
|
|
|